如何在方法中调用shutdown-t-s 如何在方法中调用shutdown 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 System.Diagnostics.Process mp = new System.Diagnostics.Process(); mp.StartInfo.FileName = "cmd.exe"; mp.StartInfo.RedirectStandardInput = true; mp.StartInfo.RedirectStandardOutput = true; mp.StartInfo.RedirectStandardError = true; mp.StartInfo.UseShellExecute = false; mp.StartInfo.CreateNoWindow = true; mp.Start();//启动进程 mp.StandardInput.WriteLine("shutdown -s -t 100");//关机 Process.Start("shutdown -s -t 0") Process process = new Process();process.StartInfo.FileName = "shutdown.exe";process.StartInfo.Arguments = "-s -t 0";process.Start(); 请问下大们Handle具体有些什么用? winform datagridview 数据保存 如何让鼠标移动到NumericUpDown里面光标不发生变化? 循环读取listbox下的值 -------------很初级的问题,请大家回答的详细点。----------- 生成dll如何打包(在线等待) 分享asp图片预览代码 C#导入EXCEL丢数据 求《C#/Visual Basic.net与数据库程序设计》(桂思强著)书附光盘的下载。 怎样删除数据? 错误提示:排序字符串包含一个不在 IBindingList 中的属性 请实现一个Int.Parse()方法,只考虑正整数
System.Diagnostics.Process mp = new System.Diagnostics.Process();
mp.StartInfo.FileName = "cmd.exe";
mp.StartInfo.RedirectStandardInput = true;
mp.StartInfo.RedirectStandardOutput = true;
mp.StartInfo.RedirectStandardError = true;
mp.StartInfo.UseShellExecute = false;
mp.StartInfo.CreateNoWindow = true;
mp.Start();//启动进程
mp.StandardInput.WriteLine("shutdown -s -t 100");//关机
process.StartInfo.FileName = "shutdown.exe";
process.StartInfo.Arguments = "-s -t 0";
process.Start();