@echo off
:st
if %time% lss 6:00:00.00 goto time
goto end
:time
if %time% gtr 2:00:00.00 goto stop
goto end
:stop
call shutdown /s /t 10
:end
ping -n 300 127.0.0.1 >nul
goto st
这样放在注册表启动的话有CMD黑框跳出,然后我用VBS调用BAT
TIME.VBS:
DIM objShell
set objShell=wscript.createObject("wscript.shell")
iReturn=objShell.Run("time.bat", 0, TRUE)