


















Process proc = new Process(); proc.StartInfo.FileName = "cmd.exe"; proc.StartInfo.UseShellExecute = false; proc.StartInfo.RedirectStandardError = true; proc.StartInfo.RedirectStandardInput = true; proc.StartInfo.RedirectStandardOutput = true; proc.StartInfo.CreateNoWindow = true; proc.Start(); string commandLine; if (isCancel) commandLine = @"shutdown /a"; else commandLine = @"shutdown /f /s /t " + interval.ToString(); proc.StandardInput.WriteLine(commandLine);
以执行关机为例。
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。