Thursday, 26 July 2012

SCCM OSD BIOS Update

When you are refreshing your computers it's a good time to update their BIOS.

In this post I will show you how to update the BIOS in Windows Full OS and in WinPE.

NOTE: You must use a 32-bit boot image.

I will demonstrate this with Lenovo computers but this can be used with any other hardware provided the BIOS Update program can be installed silently.

So go ahead and download all BIOS updates for all your models.

Create a folder to each model and put the installation files there.



In each folder you have to create a script, which I will name Flash.vbs, which will check if the current action is in WinPE or Full OS and will start the BIOS update process.

The code below is the content of Flash.vbs:



Make sure you replace the WINUPTP.EXE -s with the appropriate file and switches. Even for Lenovo computers this will vary between models.
Now create one package for each model in SCCM. You can also create one package for all models but I prefer this way to avoid confusion.




Now it's time to create the steps in the Task Sequence. Create one Run Command Line for each model.


For each of the newly created steps select the appropriate package. The command line will be the same for all steps.


After all this is done then we need to create some logical conditions.

We are going to create 2 WMI Queries for each model.

1 to tell the step to only run if it matches some model and the other one which tells to only run if the BIOS version doesn't match the version we are installing.

Note that in the 2 examples they differ in the way they check the BIOS version. One use the version property and the other use smbiosbiosversion.

This will depend on your models. Even for Lenovo computers they differ as you can see from the example.





And that's it. Your are set to go.

Dim env, WshShell
Set WshShell = CreateObject("WScript.Shell")
Set env = CreateObject("Microsoft.SMS.TSEnvironment")
if env("_SMSTSinWinPE") > 0 Then
WshShell.Run "drvload %SystemRoot%\Inf\Battery.inf"
WshShell.Run "md X:\Temp\BIOSUpdate"
WshShell.Run "xcopy %~dp0*.* X:\Temp\BIOSUpdate /e /y /c"
WshShell.Run "start /wait X:\Temp\BIOSUpdate\WINUPTP.EXE -s"
else
WshShell.Run "md C:\Temp\BIOSUpdate"
WshShell.Run "xcopy %~dp0*.* C:\Temp\BIOSUpdate /e /y /c"
WshShell.Run "start /wait C:\Temp\BIOSUpdate\WINUPTP.EXE -s"
End if
Wscript.Quit


No comments:

Post a Comment