How I can launch exe file with c# code? So I have this :
Process.Start( @"C:\Program Files (x86)\Photoshop\Photoshop.exe");
But the path can be different in other machines. So is there any ideas to run .exe with different way?
Thanks!
How I can launch exe file with c# code? So I have this :
Process.Start( @"C:\Program Files (x86)\Photoshop\Photoshop.exe");
But the path can be different in other machines. So is there any ideas to run .exe with different way?
Thanks!
I found a solution.
Activator.CreateInstance(Type.GetTypeFromProgID("Photoshop.Application"));
No, you cannot run an exe file without knowing its location.
The "exception" is if the executable directory is in the PATH environment variable, which is why:
Process.Start("notepad.exe");
works.
If i understood you correctly , the executable is in your reach, so just put it in the project directory and do not specify any path (the default is a relative path):
Process.Start("Photoshop.exe");