1. VBS 不能发送 {sleep} 键?那就先打开“关闭计算机”对话框,再按 S:
Dim WshShell
Set WshShell=WScript.CreateObject("WScript.Shell")
WshShell.Run "rundll32 shell32.dll,#60"
WScript.Sleep 1000
WshShell.SendKeys "s"
2. 运行屏保:
start xx.scr /s
1. VBS cannot send the {sleep} key? Then first open the "Shut Down Windows" dialog box, and then press S:
Dim WshShell
Set WshShell=WScript.CreateObject("WScript.Shell")
WshShell.Run "rundll32 shell32.dll,#60"
WScript.Sleep 1000
WshShell.SendKeys "s"
2. Run screen saver:
start xx.scr /s