Код: Выделить всё
string MyBatchFile = @"C:\Test\test.ps1";
String Arg2 = "test7 Test8.SQL";
string Arg1 = "-ReplaceValue";
ProcessStartInfo psi = new ProcessStartInfo();
psi.Arguments = string.Format("\"{0}\" \"{1}\" \"{2}\" \"", MyBatchFile, Arg1, Arg2);
psi.FileName = @"C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" ;
Process.Start(psi);
Буду признателен за любые комментарии.
Подробнее здесь: https://stackoverflow.com/questions/788 ... -file-name