Owner's Manual

Command Line Interface Reference 35
Sample Script
The following example shows how you can use scripts to run DUPs.
The Update.bat script is an example of updating the BIOS and ESM
firmware on a Dell system. The execution results are placed in a log file
named PE2600.log. Text that represents the exit codes from the execution
of each package is also placed in the file. You may want to handle some of the
exit codes differently in the scripts you write.
This script assumes that DUPs have already been downloaded to a folder on
the target system.
Update.bat script
@echo off
set LOG=C:\Updates\PE2600.log
set PKG=C:\Updates\ESM\ESM-WIN-A18.exe
echo Executing %PKG% >>%LOG%
%PKG% /s /l=%LOG%
set ExitCode=%ErrorLevel%
if %ExitCode% EQU 0 echo Result: SUCCESSFUL >>%LOG%
if %ExitCode% EQU 1 echo Result: UNSUCCESSFUL >>%LOG%
if %ExitCode% EQU 2 echo Result: REBOOT_REQUIRED
>>%LOG%
if %ExitCode% EQU 3 echo Result: DEP_SOFT_ERROR
>>%LOG%
if %ExitCode% EQU 4 echo Result: DEP_HARD_ERROR
>>%LOG%
if %ExitCode% EQU 5 echo Result: QUAL_HARD_ERROR
>>%LOG%
if %ExitCode% EQU 6 echo Result: REBOOTING_SYSTEM
>>%LOG%
set PKG=C:\Updates\BIOS\PE2600-BIOS-WIN-A04.exe
echo Executing %PKG% >>%LOG%
%PKG% /s /l=%LOG%
Set ExitCode=%ErrorLevel%
if %ExitCode% EQU 0 echo Result: SUCCESSFUL >>%LOG%
if %ExitCode% EQU 1 echo Result: UNSUCCESSFUL >>%LOG%
if %ExitCode% EQU 2 echo Result: REBOOT_REQUIRED
>>%LOG%