Timing lock screen made eye

 

Save the following code as a bat file, windows scheduled tasks, executed once every half hour

 

OFF @echo
@echo beginning of the current time down
the SET daoTime = 10
: DAO
SET / A. 1-daoTime = daoTime
of ping -n -w 2 500 127.1> NUL
CLS
echo lock screen countdown:% daoTime% seconds
if% daoTime% == 0 (
Start% windir% \ system32 \ rundll32.exe user32.dll, LockWorkStation
) the else (GOTO DAO)

Guess you like

Origin www.cnblogs.com/yubufan/p/11616090.html