If you don´t want to delete any file, than you can create some file in first run of your script, and add the control of presence that file. See older version of Toradex Production programming script, where they created file named secondboot to detect second start of the module.
M.
We solved this like that in a earlier Update Script, where we had similar issues:
cd \%YOURFILEPATH%
IF EXIST secondBoot GOTO SecondBoot
IF NOT EXIST secondBoot GOTO FirstBoot
:FirstBoot
REM create a status file
echo FirstBoot passed > secondBoot
REM Do some other action here
ECHO Going to reboot...
update.exe /rc
EXIT
:SecondBoot
DEL secondBoot
REM Do second boot action here (i.e clean programming batch file if not needed any longer)