.NET Framework Bookmark and Share   
 index > .NET Base Class Library > Impossible execute a program from .NET
 

Impossible execute a program from .NET

Hi,

I have the same problem of this post:

http://www.thescripts.com/forum/thread441352.html

The same! I´m sure that the path is correct and that the file is there. strOutput and strError are empty and the exictCode=1. In the commando prompt gpasm works fine.

Here is the code:

Code Block

System.Diagnostics.Process proc = new System.Diagnostics.Process();
proc.StartInfo.FileName = Application.StartupPath + "\\gpasm.exe";
proc.StartInfo.Arguments = asmPath;
proc.StartInfo.Verb = "runas";
proc.EnableRaisingEvents = true;
proc.StartInfo.UseShellExecute = false;
proc.Start();
proc.WaitForExit();



Thanks a lot,

Julen
Julew

Is asmPath correct? exit code 1 couldmean gpasm.exe started then exited with an error.

also try simplifying it:

Code Block

System.Diagnostics.Process.Start(Application.StartupPath + "\\gpasm.exe", asmPath);

FelixWatts

Is asmPath correct? exit code 1 couldmean gpasm.exe started then exited with an error.

also try simplifying it:

Code Block

System.Diagnostics.Process.Start(Application.StartupPath + "\\gpasm.exe", asmPath);

FelixWatts

You can use google to search for other answers

Custom Search

More Threads

• How To Delete a File Immediately in C#
• Coundown Timer in vb.Net
• Is there a way in regular expressions matching to ...
• how a graphicspath was created
• Opening .txt files in the text editor with the click of a button on a VB application?
• Serial Port Receive (Going nuts!)
• Generic Lists - .NET CF 3.5
• Using FileStream to index through bytes in a file
• Windows Service Installation Problem
• How create and instance of a running process