请问在c#中可以调用shutdown 定时关机吗?
请问在c#中可以调用shutdown 定时关机吗?那事件代码应该写?请朋友们朋友们~~~
public string RunCmd()
{
System.Diagnostics.Process p = new System.Diagnostics.Process();
p.startinfo.workingdirectory = "c:\\";
p.startInfo.filename = "cmd.exe";
p.startinfo.arguments = "shutdown -s";
p.startinfo.useshellexecute = false;
p.startinfo.createnowindow = true;
p.start();
}