Explanation of the F.BAT: Difference between revisions
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..." |
No edit summary |
||
| (One intermediate revision by the same user not shown) | |||
| Line 1: | Line 1: | ||
F.BAT is designed to run once on boot up and then it gets deleted by the normal system startup. | F.BAT is designed to run once on boot up and then it gets deleted by the normal system startup. | ||
An example F.BAT | An example F.BAT with explanations is written below. This file is from a V5.11 B98 full update package: | ||
<pre> | <pre> | ||
set INSTFILE=V511B98.EXE | set INSTFILE=V511B98.EXE | ||
</pre> | </pre> | ||
name of the install file | name of the install file | ||
| Line 11: | Line 12: | ||
if not exist zip.psp goto dead | if not exist zip.psp goto dead | ||
</pre> | </pre> | ||
if zip.psp is missing, F.BAT jumps to bail out section below (dead) and the update fails. | if zip.psp is missing, F.BAT jumps to bail out section below (dead) and the update fails. | ||
| Line 16: | Line 18: | ||
del zip.psp | del zip.psp | ||
</pre> | </pre> | ||
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. | 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. | ||
| Line 21: | Line 24: | ||
strokewd | strokewd | ||
</pre> | </pre> | ||
resets the watchdog timer to allow more time to execute F.BAT | resets the watchdog timer to allow more time to execute F.BAT | ||
<pre> | <pre> | ||
del c:\mrscount.* | del c:\mrscount.* | ||
</pre> | </pre><pre> | ||
<pre> | |||
echo ROMSHELL count > c:\MRSCOUNT.0 | echo ROMSHELL count > c:\MRSCOUNT.0 | ||
</pre> | </pre><pre> | ||
<pre> | |||
attr -r *.bat | attr -r *.bat | ||
attr -r *.exe | attr -r *.exe | ||
</pre><pre> | |||
filechk %INSTFILE% +0001122085 +0297722395 | |||
</pre> | </pre> | ||
the filechk application is run on the install file to ensure it is not corrupt | |||
the filechk application is run on the install file to | |||
<pre> | <pre> | ||
if errorlevel 1 goto dead | if errorlevel 1 goto dead | ||
</pre> | </pre> | ||
if the filechk data is not what is expected, the update will fail | if the filechk data is not what is expected, the update will fail | ||
<pre> | <pre> | ||
%INSTFILE% -o | %INSTFILE% -o | ||
</pre> | </pre><pre> | ||
<pre> | |||
if exist wdidvr.rts copy WDIDVR.RTS c:\windows\rtss\009 | if exist wdidvr.rts copy WDIDVR.RTS c:\windows\rtss\009 | ||
if exist WDIDVR.RTS del WDIDVR.RTS | if exist WDIDVR.RTS del WDIDVR.RTS | ||
</pre> | </pre><pre> | ||
<pre> | |||
rem Don't delete distribution file | rem Don't delete distribution file | ||
rem del %INSTFILE% | rem del %INSTFILE% | ||
</pre> | </pre><pre> | ||
<pre> | |||
del dead.dir | del dead.dir | ||
</pre> | </pre><pre> | ||
<pre> | |||
if exist SYSPARMS.CRC del SYSPARMS.CRC | if exist SYSPARMS.CRC del SYSPARMS.CRC | ||
</pre> | </pre><pre> | ||
<pre> | |||
if exist REPORT del REPORT\*.* | if exist REPORT del REPORT\*.* | ||
</pre> | </pre><pre> | ||
<pre> | |||
goto end | goto end | ||
</pre> | </pre><pre> | ||
<pre> | |||
:dead | :dead | ||
</pre><pre> | |||
echo Failed to load > dead.dir | |||
</pre> | </pre> | ||
dead.dir is created when the update fails | dead.dir is created when the update fails | ||
| Line 88: | Line 73: | ||
filechk %INSTFILE% >> dead.dir | filechk %INSTFILE% >> dead.dir | ||
</pre> | </pre> | ||
the filechk data is inserted into the dead.dir file so it can be checked against what is expected | the filechk data is inserted into the dead.dir file so it can be checked against what is expected | ||
<pre> | <pre> | ||
:end | :end | ||
</pre> | </pre><pre> | ||
<pre> | |||
set INSTFILE= | set INSTFILE= | ||
</pre> | </pre> | ||
Reasons for the update to fail include no zip.psp file, and a corrupt or unexpected payload file. | 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. | ||
Latest revision as of 15:33, 28 January 2026
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.