currently this is working

System.Diagnostics.Process.Start("notepad.exe")

also with this

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

but if i try this

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

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.