Explanation of the F.BAT
F.BAT is designed to run once on boot up and then it gets deleted by the normal system startup.
An example F.BAT with explanations is written below. This file is from a V5.11 B98 full update package:
set INSTFILE=V511B98.EXE
name of the install file
if not exist zip.psp goto dead
if zip.psp is missing, F.BAT jumps to bail out section below (dead) and the update fails.
del zip.psp
delete zip.psp. In case of error in the F.BAT that hangs the system, the process that deletes F.BAT doesn’t execute and F.BAT will attempt to execute (and hang) every time the system boots. Absence of the zip.psp file will cause subsequent pass to fail and allow system to boot normally, deleting the F.BAT file.
strokewd
resets the watchdog timer to allow more time to execute F.BAT
del c:\mrscount.*
echo ROMSHELL count > c:\MRSCOUNT.0
attr -r *.bat attr -r *.exe
filechk %INSTFILE% +0001122085 +0297722395
the filechk application is run on the install file to ensure it is not corrupt
if errorlevel 1 goto dead
if the filechk data is not what is expected, the update will fail
%INSTFILE% -o
if exist wdidvr.rts copy WDIDVR.RTS c:\windows\rtss\009 if exist WDIDVR.RTS del WDIDVR.RTS
rem Don't delete distribution file rem del %INSTFILE%
del dead.dir
if exist SYSPARMS.CRC del SYSPARMS.CRC
if exist REPORT del REPORT\*.*
goto end
- dead
echo Failed to load > dead.dir
dead.dir is created when the update fails
filechk %INSTFILE% >> dead.dir
the filechk data is inserted into the dead.dir file so it can be checked against what is expected
:end
set INSTFILE=
Reasons for the update to fail include no zip.psp file, and a corrupt or unexpected payload file. If the update failed, the dead.dir file should exist on the system. By checking this file, the reason for the failure can be determined.