VBS 保持电脑不锁屏

1.将下面代码复制粘贴到记事本,然后将其扩展名改成vbs,双击运行即可。

Set objShell = CreateObject("Wscript.Shell")
objShell.popup "Unlock screen program starts to run.",2,"Success Tips",64
do
  WScript.Sleep 30000
  objShell.SendKeys "{NUMLOCK}"
  objShell.SendKeys "{NUMLOCK}"
loop

2.要想结束不锁屏这个脚本,将下面的代码复制粘贴到记事本,然后将其扩展名改成.bat,双击运行即可。

@echo off
TASKKILL /F /IM wscript.exe /T

你可能感兴趣的:(VBS,VBS)