Starting another app from my VB app

  • Thread starter Thread starter KC
  • Start date Start date
K

KC

I want to start an application from my VB program. Problem is, I don't want
to hard code the path because this app might be in a different location on
the users machine, but if it is there they can start it by going to "Start |
Run..." and entering just the executable name.

How can I do that from my code? I guess I'm asking how to start a program
that's been registered on Windows.
 
System.Diagnostics.Process.Start("Notepad") will start notepad
System.Diagnostics.Process.Start("Excel") will start excel etc etc etc
 
* "KC said:
I want to start an application from my VB program. Problem is, I don't want
to hard code the path because this app might be in a different location on
the users machine, but if it is there they can start it by going to "Start |
Run..." and entering just the executable name.

Take a look at 'System.Diagnostics.Process.Start' and 'Shell'.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top