『第
4 楼』:
1小时关机.bat
if "%time:~0,1%"=="" (set t=0%time:~1,1%) else set t=%time:~0,2%
if "%time:~3,1%"=="0" (set m=%time:~4,1%) else set m=%time:~3,2%
set /a s=t+1,f=m%%60
set s=0%s%&set "f=0%f%"
set sj=%s:~-2%:%f:~-2%
if %s:~-2%%f:~-2% lss 1700 at %sj% /interactive F:\自编程区\1小时关机选择.bat 1小时关机选择.bat
@echo off
mshta VBScript:CreateObject("WScript.Shell").Run("F:\自编程区\2分钟关机监控.bat",0)(window.close)
:start F:\自编程区\2分钟关机监控.vbs
>%tmp%\tmp.vbs echo MyVar=MsgBox ("请在两分钟内点“确定”,否则电脑就会关机", 4161, "***精工出品"):Wscript.Echo MyVar
for /f "delims=*" %%i in ('cscript.exe //nologo %tmp%\tmp.vbs') do set MyVar=%%i
pushd %tmp%&del/q "%a%?" tmp.vbs 2>nul
if "%MyVar%"=="1" goto:yes
if "%MyVar%"=="2" goto:no
goto :eof
:yes
echo.>F:\自编程区\no.bat
exit
:no
mshta VBScript:CreateObject("WScript.Shell").Run("F:\自编程区\关机and远程开机.bat",0)(window.close)
:start F:\自编程区\关机and远程开机.bat
exit 2分钟关机监控.bat
@echo off
nircmd.exe wait 120000
if exist F:\自编程区\no.bat (
del F:\自编程区\no.bat
call F:\自编程区\1小时关机.bat
exit
)
start F:\自编程区\关机and远程开机.bat [ Last edited by lotus516 on 2010-3-23 at 17:07 ]
|