Cyborg5000 Posted June 26, 2015 Posted June 26, 2015 (edited) 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)EndIfRunWait(@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 tagFileWrite ("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 ieLocal $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 June 26, 2015 by Cyborg5000 Code attachment
232showtime Posted June 27, 2015 Posted June 27, 2015 haven't use it but worth a try, let me google it for you, here ill get to that... i still need to learn and understand a lot of codes Correct answer, learn to walk before you take on that marathon.
ViciousXUSMC Posted June 29, 2015 Posted June 29, 2015 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.
Cyborg5000 Posted June 29, 2015 Author Posted June 29, 2015 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.
ViciousXUSMC Posted June 29, 2015 Posted June 29, 2015 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\/0001I am no IE automation master so I am not sure the best way to go forward from here.
Cyborg5000 Posted June 29, 2015 Author Posted June 29, 2015 (edited) 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\/0001I 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 June 30, 2015 by Cyborg5000
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now