日期:2014-05-17 浏览次数:20775 次
@echo off
for /f "tokens=4-6 delims=: " %%a in ('net time \\computerName') do (
set HRMODE=%%a
if "%%b"=="08" (set /a HR=8) else (if "%%b"=="09" (set /a HR=9) else (set /a HR=%%b))
if "%%c"=="08" (set /a MIN=9) else (if "%%c"=="09" (set /a MIN=10) else (set /a MIN=%%c+1))
)
if %MIN% GEQ 60 (
set /a MIN-=60
set /a HR+=1
)
if "%HRMODE%"=="上午" (if %HR%==12 (set HR=0))
if "%HRMODE%"=="下午" (if %HR% NEQ 12 (set /a HR+=12))
if %HR% GEQ 24 (set HR=0)
if %MIN% LEQ 9 (set MIN=0%MIN%)
if %HR% LEQ 9 (set HR=0%HR%)
at \\computerName %HR%:%MIN% test.exe
pause