Jump to content

Explanation of the F.BAT

From DocDepot
Revision as of 15:24, 28 January 2026 by AShanks (talk | contribs) (Created page with "F.BAT is designed to run once on boot up and then it gets deleted by the normal system startup. An example F.BAT is below with explanations is written below. This file is from a V5.11 B98 full update package: <pre> set INSTFILE=V511B98.EXE </pre> name of the install file <pre> if not exist zip.psp goto dead </pre> if zip.psp is missing, F.BAT jumps to bail out section below (dead) and the update fails. <pre> del zip.psp </pre> delete zip.psp. In case of error in the...")

(diff) ← Older revision | Approved revision (diff) | Latest revision (diff) | Newer revision → (diff)

F.BAT is designed to run once on boot up and then it gets deleted by the normal system startup.

An example F.BAT is below 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 insure 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.