File location

TMI

Member
Joined
Oct 15, 2003
Messages
16
I know the file name or program but do not know the path. The path also may vary from pc to pc. How do I find the file and open it or start the program without knowing the path?
 
You cant, short of recursively searching the whole hard drive for it.
 
I found what I was looking for.

Try
System.Diagnostics.Process.Start("SomeProgram.exe")
Catch ex As Exception
MsgBox(ex.Message)
Exit Sub
End Try

This works great for any program that has been installed via a install program. Does not work for exes that have only been copied to the pc. You then have to give the path to the exe.
 
Back
Top