定时关机脚本
作者:互联网
原文链接:http://www.cnblogs.com/zhy2002/archive/2010/09/03/1817269.html
var winshell = WScript.CreateObject("WScript.Shell");
function shutdown30()
{
WScript.Sleep(1000*60*30);
/*winshell.SendKeys("^+{ESC}");
WScript.Sleep(3000);
winshell.SendKeys("%f");*/
winshell.SendKeys("^{ESC}{UP}~{DOWN}~");
}
if(winshell.Popup("Are you sure?",30,"Shutdown in 30 min",4+32)!=7)
{
shutdown30();
}
如果要取消关机,打开任务管理器,终止windows script host的进程。
转载于:https://www.cnblogs.com/zhy2002/archive/2010/09/03/1817269.html
标签:脚本,关机,www,WScript,30,zhy2002,winshell,定时,SendKeys 来源: https://blog.csdn.net/weixin_30628801/article/details/96570638