CODE: [Copy to clipboard]
@echo off
::for /f "skip=3 tokens=4* delims= " %%i in ( 'net statistics workstation' ) do set timestart=%%i
set timestart=%time%
set timestartH=%timestart:~0,2%
set timestartF=%timestart:~3,2%
echo 计算机开机于 %timestart%
::echo %timestartH%
::echo %timeStartF%
set count=0
:loop
ping 127.1 /n 3600 >nul
set /a count=%count%+1
if %count% equ 1 goto startFrist
if %count% geq 24 goto startSecond
goto loop
:startFrist
echo start frist
goto loop
:startSecond
:loopH
set timecheckH=%time:~0,2%
ping 127.1 /n 60 >nul
if %timecheckH% geq 9 goto startTwo
:startTwo
echo start second
exit
pause
[