Here is an excerpt from the start /? text that I think specifies the problem:
Microsoft Windows [Version 6.1.7601]
When executing an application that is a 32-bit GUI application, CMD.EXE
does not wait for the application to terminate before returning to
the command prompt. This new behavior does NOT occur if executing
within a command script.
The way around this is to "start" a different command process, which in turn starts the program, but never takes control away from your original batch file. Example:
SET TODAY=%date:~0,2%-%date:~3,2%-%date:~6,4%
REM setting date back to an older date
DATE 12-11-11
(echo start "" "C:\path to my program\myprogram.exe"
echo del ^%^0) >tempstart.bat
start "" tempstart.bat
REM Changing date back to todays date
ping 1.1.1.1 -n 1 -w 2000>nul
DATE %TODAY%
This may or may not be a long enough delay (2 seconds), but it does institute a slight delay before changing the date back to today. If this isn't required, you can remove the ping line.