@echo off & mode 65,3 & color 0a
set title=日期快进 By 依梦琴瑶
title %title%
::设置执行次数
set Num=120
::设置等待秒数
set Sec=10
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
if '%errorlevel%' EQU '0' goto Start
echo, & echo 本工具正在申请临时管理员权限
%1 mshta vbscript:CreateObject("Shell.Application").ShellExecute("cmd.exe","/c ""%~0"" rem","","runas",1)(window.close)&&exit
:Start
set Count=1
for /f "tokens=1 delims=:" %%a in ('findstr /n "^::GetYesterdayDate::$" "%~0"') do more +%%a "%~0">GetYesterdayDate.vbs
:Loop
for /f "delims=" %%a in ('cscript /nologo GetYesterdayDate.vbs') do (
cls & echo,
echo 当前日期已设置为 %%a
date %%a
)
set /a Count+=1
if %Count% gtr %Num% (
del /f /q GetYesterdayDate.vbs
exit
)
for /l %%a in (%Sec%,-1,1) do (
title %title% -- 倒计时 %%~a 秒后执行第 %Count% 次重设日期
ping 127.0.0.1 -n "2">nul
)
goto Loop
::GetYesterdayDate::
WScript.Echo DatePart("yyyy",DateAdd("d",-1,date)) & "-" & Right("0" & DatePart("m",DateAdd("d",-1,date)), 2) & "-" & Right("0" & DatePart("d",DateAdd("d",-1,date)),2)