use*_*779 17
试试这个:
public virtual bool Install(string InstallApp, string InstallArgs)
{
System.Diagnostics.Process installProcess = new System.Diagnostics.Process();
//settings up parameters for the install process
installProcess.StartInfo.FileName = InstallApp;
installProcess.StartInfo.Arguments = InstallArgs;
installProcess.Start();
installProcess.WaitForExit();
// Check for sucessful completion
return (installProcess.ExitCode == 0) ? true : false;
}
Run Code Online (Sandbox Code Playgroud)
Bra*_*uce 11
Process process = new Process();
process.StartInfo.FileName = "[program name here]";
process.StartInfo.Arguments = "[arguments here]";
process.StartInfo.WindowStyle = ProcessWindowStyle.Maximized;
process.Start();
process.WaitForExit();
int code = process.ExitCode;
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
21920 次 |
| 最近记录: |