- @echo off &color 0a
- set "dt=%date:~,10%"
- set "yy=%dt:~,4%"
- if %yy% <> 2010 (
- (echo.%dt%)>dt.txt
- net stop w32time >nul
- date 2010-01-01
- ) else (
- if not exist "dt.txt" (
- echo.请手动修改当前时间
- pause >nul
- ) else (
- net start w32time >nul
- set /p ndt=<dt.txt
- date %ndt%
- w32tm /resync /rediscover
- )
- )
- call exit
复制代码
|