Run installed program without path

Please support our VB.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: Dec 2006
Posts: 63
Reputation: millanskie is an unknown quantity at this point 
Solved Threads: 1
millanskie's Avatar
millanskie millanskie is offline Offline
Junior Poster in Training

Run installed program without path

 
0
  #1
Mar 4th, 2009
currently this is working
  1. System.Diagnostics.Process.Start("notepad.exe")

also with this
  1. System.Diagnostics.Process.Start("C:\Program Files\FileZilla FTP Client\filezilla.exe")

but if i try this
  1. System.Diagnostics.Process.Start("filezilla.exe")

i will get an error since i did not declare the path


Is there any way how to run a executable installed on your machine without putting the path? if yes, can you please give me an example on how to do that, thanks
Reply With Quote Quick reply to this message  
Join Date: Mar 2007
Posts: 306
Reputation: timothybard is an unknown quantity at this point 
Solved Threads: 26
timothybard's Avatar
timothybard timothybard is offline Offline
Posting Whiz

Re: Run installed program without path

 
0
  #2
Mar 4th, 2009
If you don't give the entire path of the program, then Windows will search specific directories for that program.

You can change which directories it searches, but the common ones are c:\windows, c:\windows\windows\system32, etc.

notepad.exe happens to be in c:\windows\windows32, so the computer is able to find it when it searches for it.

In order to have the computer run firezilla.exe, you have to add the directory it is in to the list windows searches. Here is a link on how to do it manually:
http://www.computerhope.com/issues/ch000549.htm

Here is a link on how to set it from the command prompt:
http://www.computerhope.com/pathhlp.htm
Last edited by timothybard; Mar 4th, 2009 at 9:24 am. Reason: Added additional link
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the VB.NET Forum
Thread Tools Search this Thread



Tag cloud for VB.NET
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC