/build/static/layout/Breadcrumb_cap_w.png

BIOS Serial Number into Registry

I already have the Service Tag in the BIOS Serial Number field listed in and I would like to update the computers "System Description"


In kbox1000 admin interface:
Inventory/Computers/ - Click on individual Computer
Under Inventory Information, expand Hardware

Bingo! "BIOS Serial Number" in the KACE database *SOMEWHERE* ??????

WHY do I want this? It is our policy to use the Service Tag (aka BIOS Serial Number) as the
"System Description".

Over time we do not have the correct System Description (per our policy) in some computers. See example below.

Is something I can fix programmatically with KACE ?

Thanks,
Ross Warren

0 Comments   [ + ] Show comments

Answers (1)

Posted by: dchristian 13 years ago
Red Belt
0
Hey Ross,

I think this code will do it.

Let me know if you need help setting up the script in the scripting module of the 1000.



Const HKEY_LOCAL_MACHINE = &H80000002
strComputer = "."

Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

Set colBIOS = objWMIService. _
ExecQuery("Select SerialNumber from Win32_BIOS")

For Each objBIOS in colBIOS
strDescription = objBIOS.SerialNumber
Next

strKeyPath = "System\CurrentControlSet\Services\lanmanserver\parameters"
strValueName = "srvcomment"

Set objRegistry = GetObject _
("winmgmts:\\" & strComputer & "\root\default:StdRegProv")
objRegistry.SetStringValue HKEY_LOCAL_MACHINE, strKeyPath, strValueName, strDescription
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ