Hi,
I've just installed HP Client Management Interface v1.00c that I downloaded from the HP website. I'm running it on an HP nc6230 laptop (although this request will cover all our HP machines).
I'm trying to write a .vbs script that uses CMI to read and modify BIOS setttings. Specifically the Boot Device Order. The PDF doc that accompanies the CMI download contains a sample script for setting the boot order. I've tried running this but it doesn't work properly on my machine. I believe this is becuase I have my BIOS Setup password configured and the sample script doesn't handle this password correctly.
Please can someone help me write a vbs script that will check if a BIOS Setup password is set and reset it to our corporate standard BIOS password. I also need the script to set the default boot order to boot from Network first, then HD and then the others in the boot order after that (i.e. Multibay and Diskette).
Here's a copy of the sample vbs script so you can see what I've been working with:
<CODE/>
___________________________________
Const wbemFlagReturnImmediately = 16
Const wbemFlagForwardOnly = 32
lFlags = wbemFlagReturnImmediately + wbemFlagForwardOnly
strService = "winmgmts:{impersonationlevel=impersonate}//"
strComputer = "."
strNamespace = "/root/HP/InstrumentedBIOS"
strQuery = "select * from HP_BIOSSettingInterface"
Set objWMIService = GetObject(strService & _
strComputer & strNamespace)
Set colItems = objWMIService.ExecQuery(strQuery,,lFlags)
For each objItem in colItems
objItem.SetBiosSetting oReturn, _
"Boot Order", _
"Network Controller,Hard Drive,Multibay,Diskette", _
"<kbd/>1E302E020304"
Next
Dim strReturn
Select Case oReturn
Case 0 strReturn = "Success"
Case 1 strReturn = "Not Supported"
Case 2 strReturn = "Unspecified Error"
Case 3 strReturn = "Timeout"
Case 4 strReturn = "Failed"
Case 5 strReturn = "Invalid Parameter"
Case 6 strReturn = "Access Denied"
Case Else strReturn = "..."
End Select
WScript.Echo "SetBiosSetting() returned: (" & oReturn _
& ") " & strReturn
___________________________________
<CODE>
Please help as this is driving me nuts!!!
Many thanks in advance for any help or guidance you can give.
Kind Regards,
Greg.
I've just installed HP Client Management Interface v1.00c that I downloaded from the HP website. I'm running it on an HP nc6230 laptop (although this request will cover all our HP machines).
I'm trying to write a .vbs script that uses CMI to read and modify BIOS setttings. Specifically the Boot Device Order. The PDF doc that accompanies the CMI download contains a sample script for setting the boot order. I've tried running this but it doesn't work properly on my machine. I believe this is becuase I have my BIOS Setup password configured and the sample script doesn't handle this password correctly.
Please can someone help me write a vbs script that will check if a BIOS Setup password is set and reset it to our corporate standard BIOS password. I also need the script to set the default boot order to boot from Network first, then HD and then the others in the boot order after that (i.e. Multibay and Diskette).
Here's a copy of the sample vbs script so you can see what I've been working with:
<CODE/>
___________________________________
Const wbemFlagReturnImmediately = 16
Const wbemFlagForwardOnly = 32
lFlags = wbemFlagReturnImmediately + wbemFlagForwardOnly
strService = "winmgmts:{impersonationlevel=impersonate}//"
strComputer = "."
strNamespace = "/root/HP/InstrumentedBIOS"
strQuery = "select * from HP_BIOSSettingInterface"
Set objWMIService = GetObject(strService & _
strComputer & strNamespace)
Set colItems = objWMIService.ExecQuery(strQuery,,lFlags)
For each objItem in colItems
objItem.SetBiosSetting oReturn, _
"Boot Order", _
"Network Controller,Hard Drive,Multibay,Diskette", _
"<kbd/>1E302E020304"
Next
Dim strReturn
Select Case oReturn
Case 0 strReturn = "Success"
Case 1 strReturn = "Not Supported"
Case 2 strReturn = "Unspecified Error"
Case 3 strReturn = "Timeout"
Case 4 strReturn = "Failed"
Case 5 strReturn = "Invalid Parameter"
Case 6 strReturn = "Access Denied"
Case Else strReturn = "..."
End Select
WScript.Echo "SetBiosSetting() returned: (" & oReturn _
& ") " & strReturn
___________________________________
<CODE>
Please help as this is driving me nuts!!!
Many thanks in advance for any help or guidance you can give.
Kind Regards,
Greg.