Jump to content
Xtreme .Net Talk

Recommended Posts

Posted
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?
  • 3 weeks later...
Posted

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 exe's that have only been copied to the pc. You then have to give the path to the exe.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...