随系统一起启动- @echo off
- for /f "tokens=1,2 delims=: " %%a in ("%time%") do set/a s=10%%a,m=10%%b
- set "t=%s:~-2%:%m:~-2%"
- if "%t%" lss "09:30" (set n=a) else (
- if "%t%" gtr "11:20" (
- if "%t%" lss "15:10" (set n=a) else (
- if "%t%" gtr "17:35" (
- if "%t%" lss "20:10" (set n=a) else (
- if "%t%" gtr "22:05" set n=a
- )
- )
- )
- )
- )
- if "%n%"=="a" shutdown -s
复制代码
|