Jump to content

kid1519

Members
  • Content Count

    1
  • Joined

  • Last visited

Community Reputation

0 Neutral

About kid1519

  • Rank
    Newbie
  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...