Jump to content

Dell Bios compare and download BIOS


Recommended Posts

Trying to create a script that will compare the installed bios version and if its old, compare and download the BIOS from the dell site...

So far the code goes as below, but need help with comparing the current bios version with the one available on the dell site.

 

$1 = ("C:\data\Tag.txt")
If FileExists($1) Then
    FileDelete($1)
EndIf
$2 = ("C:\data\Newtag.txt")
If FileExists($2) Then
    FileDelete($2)
EndIf
RunWait(@ComSpec & " /c " & "wmic bios get serialnumber >> C:\data\Tag.txt" & @CRLF, "", @SW_HIDE, "$STDOUT_CHILD")
_FileWriteToLine("c:\data\Tag.txt", 1, "", 1)
$sContent = FileRead ("C:\data\Tag.txt")
$sContent = StringRegExpReplace($sContent, " ", "")
FileWrite($2, $sContent)

;Replace service tag
FileWrite ("c:\data\ctag.txt", "http://www.dell.com/support/home/us/en/19/product-support/servicetag/FCLMWQ1/drivers/advanced?s=bsd")
$sCont1 = FileReadLine ("C:\data\Newtag.txt",1)
$sCont2 = _ReplaceStringInFile("c:\data\ctag.txt", "FCLMWQ1", $scont1)

;start ie
Local $url = FileReadLine ("C:\data\ctag.txt",1)
Local $oIE = _IECreate($url, 1)
sleep (100)

Local $oInputs = _IEGetObjById($oIE, "anchorBI")
_IEAction($oInputs, "click")

Local $oInputs1 = _IEGetObjById($oIE, "DriversByCategoryversion1_3_0")
_IEAction($oInputs1, "click")

$bio = RegRead ("HKLM\HARDWARE\DESCRIPTION\System\BIOS", "BIOSVersion")

 

Edited by Cyborg5000
Code attachment
Link to comment
Share on other sites

Not sure I can help you with how your trying to do this but I have a similar "check for update and download" script I made for Maps.

How I approached it is host the file on a FTP server, then I can be in full control of what the file is named and where it is located.

 

Then it would be as simple as pull your bios version using any method you prefer and compare it to the file on your FTP and then download if needed.

 

As far as implimenting the BIOS update, its the only update type that I personally would never automate and would install in person to ensure something bad does not happen that breaks the system.

Link to comment
Share on other sites

Not sure I can help you with how your trying to do this but I have a similar "check for update and download" script I made for Maps.

How I approached it is host the file on a FTP server, then I can be in full control of what the file is named and where it is located.

 

Then it would be as simple as pull your bios version using any method you prefer and compare it to the file on your FTP and then download if needed.

 

As far as implimenting the BIOS update, its the only update type that I personally would never automate and would install in person to ensure something bad does not happen that breaks the system.

I would just like the script to check the current version of bios installed on the PC, and compare it with the list available, if there is a new version then it should show the version available and then download if clicked/accepted.

Link to comment
Share on other sites

I assume the way to do it is with parsing the page source.

In this code it lists the bios versions and the download link/location.

An example snip:

Type":"BIOS","TypeName":"DNDHOME_TYPE_BIOS","VendorVer":"A18","Year":2013},{"AppFileFrmts":"BEW,","AppLngs":"EN","AppOses":null,"BrfDesc":"This package provides the Dell System BIOS Update and is supported on Dell Optiplex 990 for Windows and DOS Operating Systems.","CReqs":null,"Cat":"BI","CtgKey":null,"Day":11,"DellVer":"A03","DriverId":"R301675","DriverName":"Dell Optiplex 990 System BIOS","FileFrmtInfo":{"CategoryId":"BI","CategoryName":null,"DellHttpFileLocation":"http:\/\/downloads.dell.com\/bios\/O990-A03.exe","DownloadType":"HTTP","DriverId":"R301675","FileCreationTime":"01\/01\/0001

I am no IE automation master so I am not sure the best way to go forward from here.

Link to comment
Share on other sites

I assume the way to do it is with parsing the page source.

In this code it lists the bios versions and the download link/location.

An example snip:

Type":"BIOS","TypeName":"DNDHOME_TYPE_BIOS","VendorVer":"A18","Year":2013},{"AppFileFrmts":"BEW,","AppLngs":"EN","AppOses":null,"BrfDesc":"This package provides the Dell System BIOS Update and is supported on Dell Optiplex 990 for Windows and DOS Operating Systems.","CReqs":null,"Cat":"BI","CtgKey":null,"Day":11,"DellVer":"A03","DriverId":"R301675","DriverName":"Dell Optiplex 990 System BIOS","FileFrmtInfo":{"CategoryId":"BI","CategoryName":null,"DellHttpFileLocation":"http:\/\/downloads.dell.com\/bios\/O990-A03.exe","DownloadType":"HTTP","DriverId":"R301675","FileCreationTime":"01\/01\/0001

I am no IE automation master so I am not sure the best way to go forward from here.

Not sure how to use your code, a little more help please...

Edited by Cyborg5000
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...