EasyManuals Logo

HP xw4300 Technical White Paper

HP xw4300
26 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #17 background imageLoading...
Page #17 background image
17
Const wbemFlagReturnImmediately = 16
Const wbemFlagForwardOnly = 32
lFlags = wbemFlagReturnImmediately + wbemFlagForwardOnly
strService = "winmgmts:{impersonationlevel=impersonate}//"
strComputer = "."
strNamespace = "/root/HP/InstrumentedBIOS"
strQuery = "select * from HP_BIOSSetting"
Set objWMIService = GetObject(strService & strComputer & _
strNamespace)
Set colItems = objWMIService.ExecQuery(strQuery,,lFlags)
Counter = 1
For Each objItem In colItems
WScript.Echo Counter & vbTab & objItem.Name & _
" = " & objItem.Value
Counter = Counter + 1
Next
Changing the Ownership Tag
Here is a sample script to change the ownership tag setting. The value field may need some
modification. Note that “E302E020304” is the keyboard scan code for the keys “abc123”.
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)
‘ "Enter Ownership Tag" is the name of the BIOS setting
‘ instance object that we want to update. The correct
‘ names of available settings are found by enumerating
‘ all instances of HP_BIOSSetting.
For each objItem in colItems
objItem.SetBiosSetting oReturn, _
"Enter Ownership Tag", _
"Some environment-specific inventory code", _
"<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"

Other manuals for HP xw4300

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the HP xw4300 and is the answer not in the manual?

HP xw4300 Specifications

General IconGeneral
BrandHP
Modelxw4300
CategoryDesktop
LanguageEnglish

Related product manuals