Ok, So for a long time, You couldn’t upgrade Dell’s Bios in WinPE x64 because they didn’t have native x64 bios installer, this has recently changed. – Download HERE
Mike wrote up a nice intro to the new utility HERE
I do all of our bios updates using the “Application Model” after the OS is laid down, so it has the 32bit subsystem, it works fine. But I know many people like to do it during PE. So I thought I’d play with it this morning and write up a script.
Benefits of doing it how I’ve setup.
- One Script works for all models, you just have to setup your folder structure to match the Computer Model in WMI.
- Grabs Bios Password from File, you only have to update one File if you change your Bios Password
- Creates TS Variables to avoid Rebooting if already on same bios version.
- Creates Log file based on the Bios Update in the %temp%\SMSTSLog Folder (X:\windows\temp\SMSTSLog\BiosFileName.log)
- New Bios version release? No Problem, delete the old one, add the new one, update Package, done, no script change required.
- It’s Fun
Once you’ve created your Folder Structure, populate it with the latest Bios files for each model. (Just download and place in the folder, no renaming required)
Also, create a txt file in the package root called Bios.txt and put your Dell Bios password in that file.
Now, the PowerShell script will query WMI for the Model, look for the bios file inside of the corresponding folder and apply it to the system using the Flash64w.exe utility. (It will pull the password from the bios.txt file in the root of your package)
Based on the Exit Code of the Bios Update, it will create a TS Variable you can use to reboot, retry if low battery or continue on with your TS. – More info about Dell Exit Codes here… I noticed it didn’t have them all though: http://en.community.dell.com/techcenter/enterprise-client/w/wiki/3462.dup-bios-updates. I trigger events based on Exit Code 2 (Successful but requires Reboot) and Exit Code 10 (Battery too Low). You can easily add additional Exit Codes and create custom variables to have your TS do other thing based on those Exit codes.
Now in your TS:
Create Dell Upgrade Bios Group, and set to only run if a Dell Computer:
select * from Win32_ComputerSystem where Manufacturer like "%Dell%"
Create Run Command Line Step:
powershell.exe -NoProfile -ExecutionPolicy ByPass -file .\DellBiosUpgradePackage-2.0.ps1
Create another Group, This will run if the battery was too low to update the Bios. It will wait 10 minutes and try again. If the Battery is still too low after that Point, it will continue on without updating Bios. – You can easily put a step here that will popup a message box about how the Bios Didn’t update, etc.
SMSTS_BiosUpdateBatteryCharge = True
Command Line Step: powershell.exe -NoProfile -ExecutionPolicy ByPass -Command "Start-Sleep -s 600"
It will then wait 10 minutes and try again, if successful, it will set variable SMSTS_BiosUpdateRebootRequired = true and continue onto the next group to reboot. If it fails due to battery again, it will set SMSTS_BiosUpdateBatteryCharge = True and show a Message that it probably has faulty battery. At this Point, you can click “OK” and let it continue, or turn it off and replace battery.
Create another Group which will reboot the computer and any other steps needed to get back to where you were before the reboot. (TS Variable = SMSTS_BiosUpdateRebootRequired equals true)
I added a “Format” step, just to ensure there was a place for the Boot Image to download too, this might not be needed in your environment depending on placement of the Bios Upgrade.
Ok, that should be it.
Once I added another line into the script to launch the software once with minimal arguments, it worked fine. I’ve contacted Dell Support to see if they have any ideas on that.
If you run into any problems, let me know and I’ll test that model if I have it.
Tested on so Far:
- Latitude E5550
- Latitude E5470
- Latitude E6540
- Latitude E6530
- Latitude E6430
- Latitude E7250
- Latitude E7240
- Precision 7510
- OptiPlex 7010