Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

System.Diagnostics.Process

Status
Not open for further replies.

dcusick

Technical User
Aug 9, 2000
271
US
Hello everyone. I am looking to execute a program from my ASP.NET webpage. I have found that you can do this by creating a new System.Diagnostics.Process object, setting the parameters, and runing the Start() method. This works fine for some apps (like I can run Notepad.exe fine) but it's not working right for my exe. I am running a command-line executable with a bunch of arguments. I have everything set up correctly, but when I call the Start() method, IE(and firefox) bring up the File Save/Run dialog box. I don't want the user to have this option. I want it to happen behind the scenes and return a value. Is there anything I can do? Am I doing something wrong? Here's my code...

Code:
         dim MyProcess as new System.Diagnostics.Process
         myProcess.StartInfo.CreateNoWindow = true
         myProcess.StartInfo.UseShellExecute = true
         myProcess.StartInfo.FileName = "My.exe"
         myProcess.StartInfo.Arguments = "My Args"
         myProcess.Start()

Any help would be greatly appreciated. Thanks!

Doug
 
The ASPNET process needs to have execute permissions on the directory where the exe resides.

Otherwise, it will try to download it (which is what you're seeing).

-paul

penny.gif
penny.gif

The answer to getting answered -- faq855-2992
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top