Reference Guide
'*** Auto On Hour and Auto On Minutes don't have PossibleValues and PossibleValuesDescription properties
if (objInstance.AttributeName <> strSpecialTK1) and (objInstance.AttributeName
<> strSpecialTK2) Then
For Each element in objInstance.Properties_.Item("PossibleValues").Value
if (objInstance.Properties_.Item("PossibleValues").Value(ArrayItem) = iTKVal)
Then
outString = outString & objInstance.AttributeName & ", " &
(objInstance.Properties_.Item
("PossibleValuesDescription").Value(ArrayItem)) & VbCrLf
end if
ArrayItem = ArrayItem + 1
Next
else
'*** Auto On Hour and Auto On Minutes token copy the current value directly
outString = outString & objInstance.AttributeName & ", " &iTKVal & VbCrLf
end if
ArrayItem = 0
Next
txtfile.WriteLine outString
'*** Close the file
txtfile.close
'*** If any errors occurred, let the user know
If Err.Number <> 0 Then
WScript.Echo "Enabling Trusted Platform Module failed."
End If
'*** Sub used to display the correct usage of the script
Sub Usage()
Dim strMessage
strMessage = "incorrect syntax. You should run: " & vbCRLF & _
"cscript.exe /nologo SampleGetBIOSSettings.vbs <systemname>"
WScript.Echo strMessage
WScript.Echo strMessage
End Sub
'==========================================================================
' End
'==========================================================================
405










