I am trying to convert a vbs to winbatch script for setting the asset tag. the vbs works fine but in winbatch I am having issues with "SetBiosSetting" here is my winbatch file:
strvalue = "asset tag"
objwmiServices = ObjectGet ( "winmgmts:{impersonationLevel=Impersonate}!//./root/HP/InstrumentedBIOS")
colItems = objwmiServices.ExecQuery ( "SELECT * from HP_BIOSSettingInterface",,48)
ForEach objItem in colItems
objItem.SetBiosSetting "Asset Tracking Number", strValue ,"<kbd/>"
if oReturn then
wscript.echo "Asset Tracking Number" & " Can not be set, Error=" & ErrCode(oReturn)
wscript.quit(oReturn )
end if
Next
the line I am having the issue is: objItem.SetBiosSetting "Asset Tracking Number", strValue ,"<kbd/>". I am not sure to make it work
thanks
Nicholas