Jump to content
Cyborg5000

Dell Bios compare and download BIOS

Recommended Posts

Cyborg5000

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

Share this post


Link to post
Share on other sites
232showtime

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 graduated.gif

Correct answer, learn to walk before you take on that marathon.

Share this post


Link to post
Share on other sites
Cyborg5000

Can i get some help on this?

Share this post


Link to post
Share on other sites
ViciousXUSMC

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.

Share this post


Link to post
Share on other sites
Cyborg5000

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.

Share this post


Link to post
Share on other sites
ViciousXUSMC

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.

Share this post


Link to post
Share on other sites
Cyborg5000

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

Share this post


Link to post
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

  • Similar Content

    • greichert
      By greichert
      I am running the following code:
      DirRemove("C:\Desktop\Install.zip",1) I don't receive an error but the folder is not deleted. If i run this same script on a non zipped folder it works fine. Does DirRemove not work for zipped files? If not is there a way to delete them?
    • Haselnuzz
      By Haselnuzz
      Hi and Hello from a Noob..:-)
      i have a very weird problem. I fill up a 2d array with a)numbers and b)letters from A-Z, so 2 columns. This works absolutely perfect. But as soon as i try to sort them (numbers ascending) the array ends up in some kind of "String-sortation". What exactly am i doin wrong? To make it easy, i post below the piece of code, which i am talking about. Hope that someone can help me out.
      Func Analyse()
          Local $BasisArray[0]
          Local $aFill = "A" & "|B" & "|C" & "|D" & "|E" & "|F" & "|G" & "|H" & "|I" & "|J" & "|K" & "|L" & "|M" & "|N" & "|O" & "|P" & "|Q" & "|R" & "|S" & "|T" & "|U" & "|V" & "|W" & "|X" & "|Y" & "|Z"
          _ArrayAdd ($BasisArray, $afill)
          Local $FreqArray[0][2]=[[]]
       
          $row = 0

          For $i = 0 to 25
       
              $fummel = _ArrayToString ($BasisArray, ":" , $row, $row)
              $readout = _GUICtrlRichEdit_GetText ($hRichEdit)
              $anzAs = stringreplace ($readout, $fummel, $fummel)
              $extended = @extended
              $FreqFill = $extended & "|" & $fummel
              _ArrayAdd($FreqArray, $FreqFill)
       
              $row = $row + 1
          Next
          _ArrayDisplay($FreqArray, "2D - Item delimited")
          _ArraySort($FreqArray)
          _ArrayDisplay($FreqArray, "bla")
       
       
      Thanks for helping me,
       
      Cheers,
       
      Patrick
    • greichert
      By greichert
      I am running an exe, that copies a seperate exe (test123.exe)from my computer and puts it onto a remote server "testserver". Everything  works fine up to this point. I need to run this copied exe (test123.exe) on "testserver" but it keeps running on my computer instead. The code I am using to run the exe is below. What am I doing wrong? How can I get this executable to run on the remote server and not my home computer?
      RunWait( "\\testserver.domain.com\c$\user1\greichert\Desktop\InstallEXE\InstallEXE\test123.exe","\\testserver.domain.com\c$\Users\user1\Desktop\InstallEXE\InstallEXE");run exe  
    • greichert
      By greichert
      I am trying to stop a windows service on a separate server than where my script is running. When I run the following script on the same server as the service I need to stop, it works fine. 
      RunWait(@ComSpec & " /c net stop FascetAgentfv2", @ScriptDir, @SW_HIDE);stop agent But when I change "@ScriptDir" to ""\\newserver\c$\Program Files\test\" and run it on my server nothing happens. I tried to error handle and all it was returning was "2". Any suggestions?
    • ufukreis1212
      By ufukreis1212
      Hello, I am new members. Help me please. I want vbs convert to au3 .
      This vbs code : 
      'deneme Set SystemSet = GetObject("winmgmts:").InstancesOf ("Win32_OperatingSystem") strOSArch = GetObject("winmgmts:root\cimv2:Win32_OperatingSystem=@").OSArchitecture Set objNetwork = CreateObject("Wscript.Network") Set wshShell = CreateObject( "WScript.Shell" ) strComputerName = wshShell.ExpandEnvironmentStrings( "%COMPUTERNAME%" ) Set oShell = WScript.CreateObject("WScript.Shell") proc_arch = oShell.ExpandEnvironmentStrings("%PROCESSOR_ARCHITECTURE%") Set oEnv = oShell.Environment("SYSTEM") strComputer = "." Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2") Set colMB = objWMIService.ExecQuery("Select * from Win32_BaseBoard") Set colCSes = objWMIService.ExecQuery("SELECT * FROM Win32_ComputerSystem") Set colProcessors = objWMIService.ExecQuery("Select * from Win32_Processor") Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2") Set colItemsx = objWMIService.ExecQuery( _ "SELECT * FROM Win32_VideoController",,48) '------------------------------------------------------------------- Set obj = GetObject("winmgmts:").InstancesOf("Win32_PhysicalMemory") i = 1 For Each obj2 In obj memTmp1 = obj2.capacity / 1024 / 1024 TotalRam = TotalRam + memTmp1 i = i +1 Next '-------------------------------------------------------------------- Dim objWMIService : Set objWMIService = GetObject("winmgmts:\\.\root\cimv2") Set colItems = objWMIService.ExecQuery("Select Architecture from Win32_Processor") For Each objItem in colItems if objItem.Architecture = 0 then strArchitecture = "x86" end if if objItem.Architecture = 9 then strArchitecture = "x64" end if next '-------------------------------------------------------------------- strComputer = "." ' Local computer strMemory = "" i = 1 set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2") set colItems = objWMIService.ExecQuery("Select * from Win32_PhysicalMemory") For Each objItem In colItems if strMemory <> "" then strMemory = strMemory & vbcrlf strMemory = strMemory & "Bank" & i & " : " & (objItem.Capacity /1024 /1024) & " Mb" i = i + 1 Next installedModules = i - 1 Set colItems = objWMIService.ExecQuery("Select * from Win32_PhysicalMemoryArray") For Each objItem in colItems totalSlots = objItem.MemoryDevices Next '---------------------------------------------------------------------- Set objWMISvc = GetObject( "winmgmts:\\.\root\cimv2" ) Set colItems = objWMISvc.ExecQuery( "Select * from Win32_ComputerSystem" ) For Each objItem in colItems strComputerDomain = objItem.Domain Next for each System in SystemSet For Each objItem in colItemsx For Each objProcessor in colProcessors For Each bbType In colMB MbVendor = bbType.Manufacturer MbModel = bbType.Product MsgBox "İşletim Sistemi : " & System.Caption & vbNewLine & _ "İşletim Sistemi Versionu : " & + System.Version & vbNewLine & _ "Windows Mimari Yapısı: " & strOSArch & vbNewLine & _ "Kullanıcı isminiz: " & objNetwork.UserName & vbNewLine & _ "Bilgisayar ismi: " & strComputerName & vbNewLine & _ "Çalışma Grubu: " & strComputerDomain & vbNewLine & _ "--------------------------------------" & vbNewLine & _ "Anakart: " & MbVendor & " " & "[" & MbModel & "]" & vbNewLine & _ "--------------------------------------" & vbNewLine & _ "Grafik Kartı: " & objItem.Caption & vbNewLine & _ "Driver Version: " & objItem.DriverVersion & vbNewLine & _ "--------------------------------------" & vbNewLine & _ "İşlemci Üreticisi: " & objProcessor.Manufacturer & vbNewLine & _ "İşlemci İsmi: " & objProcessor.Name & vbNewLine & _ "CPU Mimarisi: " & strArchitecture & vbNewLine & _ "İşlemci Çekirdek sayısı: " & oEnv("NUMBER_OF_PROCESSORS") & vbNewLine & _ "--------------------------------------" & vbNewLine & _ "Toplam RAM: " & TotalRam & " MB" & vbNewLine & _ "Toplam Slot: " & totalSlots & vbNewLine & _ "Boş Slot: " & (totalSlots - installedModules) & vbNewLine & _ "Ramlerin bulunduğu slotlar:" & vbcrlf & strMemory,0,"deneme" Next Next Next Next please help me , thanks.
×