为了提醒自己休息特意写的
时间:2010-09-20 来源:sucre03
不管是学习、工作,还是玩,有的时候会在电脑旁边待很长时间,为了让自己注意身体,就写了这样一个批处理,在适当的时候提醒自己
- @echo off
- reg add HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v 该休息啦.bat /t reg_sz >nul
- @echo off
- :start
- for /f "delims=: tokens=2" %%i in ('systeminfo ^| findstr "系统启动时间"') do set a=%%i
- set var=%a:~2,1%
- if "var" geq 2 (goto alert) else goto start
- :alert
- echo msgbox "该休息啦">alert.vbs
- call alert
- del /f/q alert.vbs,time.txt
- pause
- ::systeminfo | find "系统启动时间">"%cd%\time.txt"
相关阅读 更多 +