How to execute applications (exe files)

priyamtheone

Well-known member
Joined
Sep 20, 2007
Messages
96
Programming Experience
Beginner
Hi evryone,
This thing is a bit foggy to me, can anyone help?
I hav created a windows explorer like application using VB.Net 2005. It has a listview control by which u can browse through all the local disk drives of ur machine as well as all the folders, subfolders and files in them by double clicking the folders. Now while browsing the files under a folder, if i get an exe file, i wanna execute that file by double clicking on it and start the application from right there just as we do in windows explorer. What's the procedure to that?

Regards.
 
VB.NET:
Process.Start("c:\path\filename.exe")
You can also run document file same if their file extension is associated with an application:
VB.NET:
Process.Start("c:\path\filename.txt")
Otherwise you have to use the application as file to run and the document as argument:
VB.NET:
Process.Start("c:\windows\notepad.exe", "c:\path\filename.txt")
 
hi,

was just wondering.. in addition to run an application from vb.net...Is there any method that one could adoopt to have a list of executables to install on a system. These will need to be installed after each other... therefore, when one executable is finished the other will start.

Is there such a method to know that an installation of any executable is finished

Cheers
 
Process.Start(String) Method returns the new Process instance so you can use its WaitForExit method to wait before starting next. Don't do this in a UI thread.
 
Back
Top