How to start this process

I want to know how to start this process from C #:

TestFile.exe -i "c:\Program Files\My App\MyContextMenuExtension.dll" "c:\Program Files\My App\LogicNP.EZShellExtensions.dll" 

      

How can I send this two arguments to toprocess?

0


source to share


2 answers


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);

      



+1


source


Process.Start("TestFile.exe", @"-i \"c:\Program Files\My App\MyContextMenuExtension.dll\" \"c:\Program Files\My App\LogicNP.EZShellExtensions.dll\"");

      



Don't forget the path in the first parameter. The second parameter is your arguments, each separated by a space (if your arguments have a space, you need to put them in between "

+1


source







All Articles