/build/static/layout/Breadcrumb_cap_w.png

How to Update Dell BIOS Multiple Versions

Problem:
You want to use Dell Updates to deploy the latest BIOS in your environment, but you find out that you need to step up the BIOS more than 1 version in order to allow the latest version to deploy with the Dell Updates feature. 
Note: This could also be used to increment multiple versions for BIOSes with passwords.
 
Solution:
Create a script to increment the upgrades to a compatible version. This script will require some robustness. Since we'll need to upgrade to certain versions and each upgrade will have to follow with a restart, not to mention may not all be able to execute following each other. With that in mind my example is only one of the possibilities to help you accomplish this task. If this doesn't suite your needs maybe it will help you figure out the path that will. For me it was easiest to also leverage the registry to help accomplish this task.
  1. Create an Online KScript
  2. Upload all the needed BIOS executable packages to the script dependencies
  3. Set a verify step checking the registry for the key you create to make sure it is not the final version - this is mostly an efficiency step
  4. In the On Success section of the script add the Run A Batch file step
  5. Input the contents of your batch into the provided box and save - at the end of this I'll provide mine as an example which I used on a Dell Optiplex 990.
  6. For those of you who are using BIOS passwords you'll want to follow step 4 with a command to delete the batch file to prevent your password from potentially leaking to your users. For this purpose you can use the Launch step with the following configuration to accomplish this:
    1. Directory: $(KACE_SYS_DIR)
    2. File: cmd.exe
    3. Check the box to "Wait for completion"
    4. Parameters: /C del $(KACE_DEPENDENCY_DIR)\*.bat
    5. Save changes
  7. Set a Remediation step to Log a message. Here's how mine is configured:
    1. Type Output
    2. Message: BIOS is already at desired version.
  8. Save script and test on a system
 
As promised here is the batch file I used in my execution. This batch file also outputs it's own log file in the script dependency directory so you can see if there are issues with the actual execution of the batch file. You'll have to tweak this batch for your purposes. If you don't have a BIOS password remove the /p= switch from the BIOS update lines.
 
@echo off
:: Logging
SET log="%CD%\log.log"
SET work="%CD%\work.txt"

ECHO. >> %log%
ECHO BIOS Update started %time% %date% >> %log%

:: Check what system model
ECHO. >> %log%
ECHO Making sure system is Optiplex 990, if it isn't BIOS will not be flashed. >> %log%
FOR /F "usebackq skip=1 tokens=1,2" %%G IN (`WMIC COMPUTERSYSTEM get MODEL`) DO IF %%H==990 GOTO 990 >> %log% 2>&1
GOTO WRONG

:990
ECHO Opiplex 990 detected. >> %log%
:: Check to see what BIOS version is currently running
ECHO. >> %log%
ECHO Checking current BIOS version, if on version lower than A13 will be flashed to A13. >> %log%
ECHO If on version lower than A10 it will be flashed to A10. >> %log%
ECHO If on version lower than A05 it will be flashed to A05 first. >> %log%
WMIC BIOS get SMBIOSBIOSVersion | FIND "A"  > %work%
ECHO BIOS Version found. >> %log%
TYPE %work% >> %log%
FOR /F "usebackq" %%G IN (`type "%work%"`) DO IF %%G LSS A05 GOTO UPGRADE5 >> %log% 2>&1
FOR /F "usebackq" %%G IN (`type "%work%"`) DO IF %%G LSS A10 GOTO UPGRADE10 >> %log% 2>&1
FOR /F "usebackq" %%G IN (`type "%work%"`) DO IF %%G LSS A13 GOTO UPGRADE13 >> %log% 2>&1
GOTO CLEAN

:UPGRADE5
:: Run version upgrade A05
ECHO. >> %log%
ECHO Detected BIOS not at A05 or higher, Flashing BIOS to A05. >> %log%
"%CD%\O990-A05.exe" /s /f /p=password/l=%log%
GOTO CLEANUP5

:UPGRADE10
:: Run version upgrade
ECHO. >> %log%
ECHO Detected BIOS not at A10 or higher, Flashing BIOS to A10. >> %log%
"%CD%\O990-A10.exe" /s /f /p=password/l=%log%
GOTO CLEANUP

:UPGRADE13
:: Run version upgrade
ECHO. >> %log%
ECHO Detected BIOS not at A10 or higher, Flashing BIOS to A10. >> %log%
"%CD%\O990-A13.exe" /s /f /p=password/l=%log%
GOTO CLEANUP13

:WRONG
:: What to do if not right computer type
ECHO. >> %log%
ECHO ERROR THIS SYSTEM DOES NOT MEET THE REQUIREMENTS FOR THIS MANAGED INSTALL. >> %log%
GOTO END

:CLEANUP5
:: Clean up
ECHO. >> %log%
ECHO BIOS has been upgraded to A05 this package will need to be executed again to upgrade to A10. >> %log%
ECHO Since the token to indicate the BIOS is on A13 or later is not present, if the Managed Install >> %log%
ECHO is still set to 4 or more tries then re-execution will be automatic. %time% %date% >> %log%
DEL /F /Q "%CD%\work.txt" >> %log% 2>&1
SHUTDOWN -r -t 15 /c "BIOS upgraded to A05 via KBOX MI" /d p:1:1
GOTO END

:CLEANUP
:: Clean up
ECHO. >> %log%
ECHO BIOS has been upgraded to A10 this package will need to be executed again to upgrade to A10. >> %log%
ECHO Since the token to indicate the BIOS is on A13 or later is not present, if the Managed Install >> %log%
ECHO is still set to 4 or more tries then re-execution will be automatic. %time% %date% >> %log%
REG ADD HKCC\BIOS /v Version /t REG_SZ /d A10 /f >> %log% 2>&1
DEL /F /Q "%CD%\work.txt" >> %log% 2>&1
SHUTDOWN -r -t 15 /c "BIOS upgraded to A10 via KBOX MI" /d p:1:1
GOTO END

:CLEANUP13
:: Clean up
ECHO. >> %log%
ECHO BIOS has been upgraded to A13. %time% %date% >> %log%
REG ADD HKCC\BIOS /v Version /t REG_SZ /d A13 /f >> %log% 2>&1
DEL /F /Q "%CD%\work.txt" >> %log% 2>&1
SHUTDOWN -r -t 15 /c "BIOS upgraded to A13 via KBOX MI" /d p:1:1
GOTO END

:CLEAN
ECHO. >> %log%
ECHO BIOS already at A10 or higher, no upgrade performed. %time% %date% >> %log%
WMIC BIOS get SMBIOSBIOSVersion | FIND "A" > %work%
FOR /F "usebackq" %%G IN (`type "%work%"`) DO REG ADD HKCC\BIOS /v Version /t REG_SZ /d %%G /f >> %log% 2>&1
DEL /F /Q "%CD%\work.txt" >> %log% 2>&1
GOTO END

:END
::End

Comments

  • This is an awesome script. I am having a bit of an issue with running it in my environment, the current BIOS version check is always returning that the bios is already upgraded. How can i see that output of the WMIC BIOS get SMBIOSBIOSVersion | FIND "A" > %work% command? The work.txt folder is always blank when i check to see what it has. - akiglen 4 years ago
    • run WMIC BIOS get SMBIOSBIOSVersion and check how the BIOS is called. Dell uses Axx or simple numbers. It will not work if the BIOS version is 1.12.0 as an example - Nico_K 4 years ago
      • Yeah, that's what i surmised. BIOS versions are using 1.1x format. Oh, well, targeting a different way with KACE server and smart labels. - akiglen 4 years ago
This post is locked
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ