Reputation: 1012
I can see that in ProcessStartInfo you can specify a file name, but how do you specify a file path?
Thanks.
Upvotes: 7
Views: 17831
Reputation: 48076
When it says "filename" it means full or relative path to the file. So you could do something like @"C:\program files\my folder\myProcess.exe";
for example. Or @".\..\..\MyRelativePathedProcess.exe";
You can also control the CWD with Process.StartInfo's WorkingDirectory property.
Upvotes: 13
Reputation: 17957
use Process.StartInfo.WorkingDirectory
or just specify the full path of the file name.
Upvotes: 4