Jump to content

kid1519

Members
  • Posts

    1
  • Joined

  • Last visited

Everything posted by kid1519

  1. 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
×
×
  • Create New...