Reputation: 3767
I want to know how can I start this process wiht C# :
TestFile.exe -i "c:\Program Files\My App\MyContextMenuExtension.dll" "c:\Program Files\My App\LogicNP.EZShellExtensions.dll"
How can I send that two argumant toprocess ?
Upvotes: 0
Views: 748
Reputation: 932
Process.Start("TestFile.exe", @"-i \"c:\Program Files\My App\MyContextMenuExtension.dll\" \"c:\Program Files\My App\LogicNP.EZShellExtensions.dll\"");
Dont forget the path in first parameter. Second parameter is your arguments, each separated by a space (if there is space in your arguments, you need to put them inbetween \"
Upvotes: 1
Reputation: 245419
string arguments =
"-i \"c:\\Program Files\\My App\\MyContextMenuExtension.dll\"";
arguments += " \"c:\\Program Files\\MyApp\\LogicNP.EZShellExtensions.dll\"";
System.Diagnostics.Process.Start("TestFile.exe", arguments);
Upvotes: 1