System.IO之关机线程调用
一个XLUO写的关机程序,至于XLUO是谁,就不告诉大家了。
引用名称空间
using system.IO;
方法内容:
string tempFileName=string.Format("{0}.bat",new Random().Next().ToString());
string tempFileContent="SHUTDOWN -S -T 30";
System.IO.StreamWriter sw = new System.IO.StreamWriter(tempFileName);
sw.Write(tempFileContent);
sw.Close();
启用线程
System.Diagnostics.Process.Start(tempFileName);

浙公网安备 33010602011771号