An invalid number appears when running the batch file. How can I fix it?
The code below reduces the date by two years, then runs a piece of software, and then changes the date back to the current one. Because this software has already expired, I have to use this method to start it.
It had always been running fine before, and this problem only started today. Why is that? Experts, please help fix it.
This appears when running it:

@echo off&setlocal ENABLEDELAYEDEXPANSION
set str=%date%
for /f "tokens=1 delims= " %%a in ("%date%") do set w=%%a
for /f "tokens=1,2* delims=-" %%a in ("%w%") do (set/a e=%%a-2
date !e!-%%b-%%c
start "" "d:\Progra~1\PhraseExpress\phraseexpress.exe"
call :ProcDelay 1000
date !str!
)
exit
:ProcDelay delayMSec_
setlocal enableextensions
for /f "tokens=1-4 delims=:. " %%h in ("%time%") do set start_=%%h%%i%%j%%k
:_procwaitloop
for /f "tokens=1-4 delims=:. " %%h in ("%time%") do set now_=%%h%%i%%j%%k
set /a diff_=%now_%-%start_%
if %diff_% LSS %1 goto _procwaitloop
endlocal & goto :EOF
The code below reduces the date by two years, then runs a piece of software, and then changes the date back to the current one. Because this software has already expired, I have to use this method to start it.
It had always been running fine before, and this problem only started today. Why is that? Experts, please help fix it.
This appears when running it:

@echo off&setlocal ENABLEDELAYEDEXPANSION
set str=%date%
for /f "tokens=1 delims= " %%a in ("%date%") do set w=%%a
for /f "tokens=1,2* delims=-" %%a in ("%w%") do (set/a e=%%a-2
date !e!-%%b-%%c
start "" "d:\Progra~1\PhraseExpress\phraseexpress.exe"
call :ProcDelay 1000
date !str!
)
exit
:ProcDelay delayMSec_
setlocal enableextensions
for /f "tokens=1-4 delims=:. " %%h in ("%time%") do set start_=%%h%%i%%j%%k
:_procwaitloop
for /f "tokens=1-4 delims=:. " %%h in ("%time%") do set now_=%%h%%i%%j%%k
set /a diff_=%now_%-%start_%
if %diff_% LSS %1 goto _procwaitloop
endlocal & goto :EOF


