public static void RunProcess(string FileName, string Arguments, ProcessWindowStyle WindowStyle, bool WaitforExit)
{
MessageBox.Show("Runnig the process :- File name- " + FileName.ToString() + "argumetns- " + Arguments.ToString() + "windowStyle- " + WindowStyle.ToString() + "WaitForExit- " + WaitforExit.ToString());
Process MyProcess = new Process();
MyProcess.StartInfo.FileName = FileName;
MyProcess.StartInfo.Arguments = Arguments;
MyProcess.StartInfo.WindowStyle = WindowStyle;
MyProcess.Start();
if (WaitforExit)
MyProcess.WaitForExit();
}
這裏參數也有一些空格。如何使用多個參數運行應用程序?
究竟是什麼問題? –
問題是什麼? –
它拋出無效參數的錯誤。 – DDave