.NET Framework Bookmark and Share   
 index > .NET Base Class Library > process.start(http://someserver/someapp.exe)
 

process.start(http://someserver/someapp.exe)

Dim proc As Process
proc = New Process
proc.EnableRaisingEvents = True
proc.StartInfo.FileName = "http://someserver/someapp.exe"
Proc.start()


Do While Not proc.HasExited ' I GET ERROR --No process is associated with this object.
System.Threading.Thread.Sleep(250)
Application.DoEvents()
Loop
If proc.HasExited Then
MessageBox.Show(proc.ExitCode.ToString)
End If


but if i do proc.start("c:\someapp.exe") RUNS SMOOTHLY NO PROBLEM

siddkathya
Unfortunately, no, other than possibly making the application a web application. Executable files have to reside within the file system of the local machine.

That being said, network shares are considered part of the file system, so you could use network shares such as "\\server\public\executable.exe" , but you simply cannot run an executable directly off of an HTTP site. Not possible.
David Morton - http://blog.davemorton.net/ - @davidmmorton
David M Morton
Thanks again! I appreciate your quick response.


  • Marked As Answer bysiddkathya Tuesday, June 02, 2009 12:23 PM
  •  
siddkathya

Download the application first, and then run it from the hard drive. The way you're doing it now, given the http:// url header, is going to open your default browser and try to save the file, not run it. You can't run an executable from a remote url, you can only run it locally.


David Morton - http://blog.davemorton.net/ - @davidmmorton
David M Morton
Thanks! But the requirement of the project is, client m/c isn't suppose to have the executable. The executable is always going to reside on "Someserver". Any other way around it?
siddkathya
Unfortunately, no, other than possibly making the application a web application. Executable files have to reside within the file system of the local machine.

That being said, network shares are considered part of the file system, so you could use network shares such as "\\server\public\executable.exe" , but you simply cannot run an executable directly off of an HTTP site. Not possible.
David Morton - http://blog.davemorton.net/ - @davidmmorton
David M Morton
Thanks again! I appreciate your quick response.


  • Marked As Answer bysiddkathya Tuesday, June 02, 2009 12:23 PM
  •  
siddkathya

You can use google to search for other answers

Custom Search

More Threads

• SeachAD objects based on SId
• DateTime.Now returning incorrect system datetime
• Needs help on Zip & Unzip folder files programs
• Out of Memory Exceptions and proper clean up of variables
• Updateing picturebox from filesystem watcher
• Is Encrypted or Not
• How to set RTC alarm time and enable the RTC alarm
• PipeStream - Check For Read
• How to delete content of a Stream?
• Keeping a service running