SELECT CompSys.Manufacturer0 as 'OEM', CompSys.model0 as 'Model',BIOS.SMBIOSBIOSVERSION0 as 'BIOSVersion', COUNT(Sys.Resourceid) AS 'TotalSystems' FROM V_R_System as Sys LEFT JOIN V_GS_PC_BIOS as BIOS on Sys.resourceid = BIOS.resourceid LEFT JOIN V_GS_COMPUTER_SYSTEM as CompSys on Sys.resourceid = CompSys.resourceid WHERE
CompSys.Manufacturer0 LIKE '%dell%' AND (CompSys.Model0 LIKE '%optiplex%' OR CompSys.Model0 LIKE '%latitude%' OR CompSys.Model0 LIKE '%precision%')
GROUP BY CompSys.Manufacturer0,CompSys.model0, BIOS.SMBIOSBIOSVersion0 ORDER BY CompSys.Model0, BIOS.SMBIOSBIOSVersion0
Disclaimer: You are required to modify this sample script for your specific environment; this script must be updated after a new BIOS upgrade is released.
DellBIOSUpgdEndUser.vbs
' DELL BIOS UPGRADES ' Dell Inc 2008 ' For new BIOS revisions you can download them from ftp.dell.com/bios ' Or for individual systems use the download menus on support.dell.com ' Modify the Case statement below to reflect newer revisions On Error Resume Next DlgTitle = "IT Department" Set WshShell = CreateObject("Wscript.Shell") Set WshNet = CreateObject("Wscript.Network") PathToScript = Left(WScript.ScriptFullName,(Len(WScript.ScriptFullName) - (Len(WScript.ScriptName) + 1))) CompName = WshNet.ComputerName Set objLocator = CreateObject("WbemScripting.SWbemLocator") Set wmi = objLocator.ConnectServer(CompName, "root\cimv2",,,,,128) For Each Instance in wmi.ExecQuery("Select * From Win32_ComputerSystem",,48) Model = Instance.Model Next For Each Instance in wmi.ExecQuery("Select * From Win32_SystemEnclosure",,48) ServTag = Instance.serialnumber Next For Each Instance in wmi.ExecQuery("Select * From Win32_Bios",,48) BIOSRev = Instance.SMBIOSBIOSVersion Next Model = Trim(Model) Select Case Model
Model = Instance.Model
ServTag = Instance.serialnumber
BIOSRev = Instance.SMBIOSBIOSVersion
Case "Latitude D420" : ExeToRun = "D420_A06.EXE" : NewBIOSVersion="A06" Case "Latitude D430" : ExeToRun = "D430_A05.EXE" : NewBIOSVersion="A05" Case "Latitude D520" : ExeToRun = "D520_A06.EXE" : NewBIOSVersion="A06" Case "Latitude D530" : ExeToRun = "D530_A04.EXE" : NewBIOSVersion="A04" Case "Latitude D531" : ExeToRun = "A04_D531.EXE" : NewBIOSVersion="A04" Case "Latitude D620" : ExeToRun = "D620_A09.EXE" : NewBIOSVersion="A09" Case "Latitude D630" : ExeToRun = "D630_A08.EXE" : NewBIOSVersion="A08" Case "Latitude D820" : ExeToRun = "D820_A08.EXE" : NewBIOSVersion="A08" Case "Latitude D830" : ExeToRun = "D830_A10.exe" : NewBIOSVersion="A10" Case "Latitude XT" : ExeToRun = "DXT_A02.EXE" : NewBIOSVersion="A02" Case "OptiPlex GX280" : ExeToRun = "GX280A08.exe" : NewBIOSVersion="A08" Case "OptiPlex SX280" : ExeToRun = "SX280A09.exe" : NewBIOSVersion="A09" Case "OptiPlex GX520" : ExeToRun = "A11GX620.exe" : NewBIOSVersion="A11" Case "OptiPlex GX620" : ExeToRun = "A11GX620.exe" : NewBIOSVersion="A11" Case "OptiPlex 320" : ExeToRun = "O320-0101011.EXE" : NewBIOSVersion="1.1.11" Case "OptiPlex 330" : ExeToRun = "O330-A03.EXE" : NewBIOSVersion="A03" Case "OptiPlex 740" : ExeToRun = "O740-2012.EXE" : NewBIOSVersion="2.0.12" Case "OptiPlex 745" : ExeToRun = "o745-020601.exe" : NewBIOSVersion="2.6.1" Case "OptiPlex 755" : ExeToRun = "O755-A09.EXE" : NewBIOSVersion="A09" Case "Precision M2300" : ExeToRun = "M2300A04.EXE" : NewBIOSVersion="A04" Case "Precision M4300" : ExeToRun = "M4300A09.EXE" : NewBIOSVersion="A09" Case "Precision M6300" : ExeToRun = "M6300A08.EXE" : NewBIOSVersion="A08" Case "Precision WorkStation 340" : ExeToRun = "WS340A07.EXE" : NewBIOSVersion="A07" Case "Precision WorkStation 650" : ExeToRun = "WS650A05.EXE" : NewBIOSVersion="A05" Case "Precision WorkStation 670" : ExeToRun = "WS670A07.EXE" : NewBIOSVersion="A07" Case "Precision WorkStation 690" : ExeToRun = "WS690A07.EXE" : NewBIOSVersion="A07" Case "Precision WorkStation T3400" : ExeToRun = "WST34A03.EXE" : NewBIOSVersion="A03" Case "Precision WorkStation T5400" : ExeToRun = "T5400A01.EXE" : NewBIOSVersion="A01" Case "Precision WorkStation T7400" : ExeToRun = "T7400A01.EXE" : NewBIOSVersion="A01" Case Else : ExeToRun = "NA"
End Select If ExeToRun = "NA" Then MsgBox "We do not currently provide a BIOS upgrade for a " & Model & vbcrlf & vbcrlf & "If this is an older model system, please excess the equipment.",0,DlgTitle Wscript.Quit(1) ElseIf BIOSRev = NewBIOSVersion Then MsgBox "The current BIOS[" & BIOSRev & "] for this " & Model & " is up-to-date and does not require an upgrade.",0,DlgTitle Wscript.Quit(1) End If ExeStr = PathToScript & "\" & ExeToRun WshShell.Run Chr(34) & ExeStr & Chr(34), 1, False Wscript.Quit(0)
MsgBox "We do not currently provide a BIOS upgrade for a " & Model & vbcrlf & vbcrlf & "If this is an older model system, please excess the equipment.",0,DlgTitle Wscript.Quit(1)
MsgBox "The current BIOS[" & BIOSRev & "] for this " & Model & " is up-to-date and does not require an upgrade.",0,DlgTitle Wscript.Quit(1)
Wscript.exe DellBIOSUpgdEndUser.vbs
Note: Modify the MOF before importing it and change the SCCM Site Server and source directory. It is also necessary after the import to look over the Package and Program properties to verify that those objects conform to your deployment standards. This MOF is a sample and is not production ready!
Note: Modify the SCCM Site Server UNC in the MOF before importing it. After the MOF import, go into the collection queries and modify the various revisions since newer BIOS upgrades will likely have been released since the document was published.
NOPAUSE – Run without user prompts. · NOREBOOT – Does not reboot the system when flashing is completed.
D620_A09.EXE -NOREBOOT –NOPAUSE Completely silent and no reboot; a reboot must occur to upgrade.
D620_A09.EXE –NOPAUSE
Completely silent and includes a forced reboot.
Is there a switch to supply the BIOS password to the command when running with the -NOPAUSE option?
The next to the last line in the VBS script is wrong.
It reads:
ExeStr = PathToScript & "\" & ExeToRun WshShell.Run Chr(34) & ExeStr & Chr(34), 1, False
This will always give you an "Unexpected end of line" error, causing the script to fail.
It is actually two lines:
ExeStr = PathToScript & "\" & ExeToRun
WshShell.Run Chr(34) & ExeStr & Chr(34), 1, False
Splitting the line into two lines corrects the problem.
The -NOPAUSE and -NOREBOOT switch can be added to the second line for silent deployment:
WshShell.Run Chr(34) & ExeStr & Chr(34) & "-NOPAUSE" & Chr(34), 1, False
-or-
WshShell.Run Chr(34) & ExeStr & Chr(34) & "-NOREBOOT -NOPAUSE" & Chr(34), 1, False
Unfortunately, I don't know VBscript that well and it took me a while to figure it out. Dell should have corrected the script before publishing the article becaus there are some people that will attempt use it that do not know VBscript at all and thier BIOS deployments will fail all the time.
Just my observation.
R. Shaw