Get Bios Serial Number then write to registry in VBScript Posted April 30, 2014 · Edited April 30, 2014 by kid1519 Hello my friend i have just learned VBS therefore, i have a my homework: Get Bios Serial Number then write to registry Code: strComputer = "."Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!" & strComputer & "rootcimv2")Set colBIOS = objWMIService.ExecQuery _ ("Select * from Win32_BIOS")For each objBIOS in colBIOS x=msgbox("Serial Number: " & objBIOS.SerialNumber)Nextconst HKEY_LOCAL_MACHINE = &H80000002strComputer = "."Set StdOut = WScript.StdOutSet oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!" &_strComputer & "rootdefault:StdRegProv")strKeyPath = "SOFTWAREGet BiosSerial Number" oReg.CreateKey HKEY_LOCAL_MACHINE,strKeyPath strValueName = "Serial Number" strValue = ???oReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue Or: http://pastebin.com/PKi4FM5c can you tell me: strValue = ??? = what do i need fill
Get Bios Serial Number then write to registry
in VBScript
Posted · Edited by kid1519
Hello my friend i have just learned VBS therefore, i have a my homework: Get Bios Serial Number then write to registry Code:
Or: http://pastebin.com/PKi4FM5c
can you tell me: strValue = ??? = what do i need fill