serial number request

Comments

5 comments

  • Adam Ruth

    Thank you for the suggestion, I've added it to our roadmap for the next version.  That should be straight forward to implement as we're already getting some data from the Win32_OperatingSystem class.

    As for who's idea the fixed column was, I wish I could remember who thought of it.  I'll give credit to Shane because he's a huge Guiness fan. :-)

    0
    Comment actions Permalink
  • Shane Corellian

    Barring any unforeseen problems we will have your OS serial number request in the next Inventory beta (scheduled of next week).

    You had me at Guinness. If we ever do meet up, Showtime33, it'll be race to see who buys the first pint.

    0
    Comment actions Permalink
  • Showtime33

    mmmmmmmmmm guinness...................................................................................................ok I remember what I was going to say....

    Here is a complete code to find the product key in windows...not sure it would/will help....but I haven't found the option to gather the product keys and perhaps export them into a pdf or something...

    the code starts here:

     ' <--------------- Open Registry Key and populate binary data into an array -------------------------->
     '
     const HKEY_LOCAL_MACHINE = &H80000002  
     strKeyPath = "SOFTWARE\Microsoft\Windows NT\CurrentVersion"
     strValueName = "DigitalProductId"
     strComputer = "."
     dim iValues()
     Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & _  
           strComputer & "\root\default:StdRegProv")
     oReg.GetBinaryValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,iValues
     Dim arrDPID
     arrDPID = Array()
     For i = 52 to 66
     ReDim Preserve arrDPID( UBound(arrDPID) + 1 )
     arrDPID( UBound(arrDPID) ) = iValues(i)
     Next
     ' <--------------- Create an array to hold the valid characters for a microsoft Product Key -------------------------->
     Dim arrChars
     arrChars = Array("B","C","D","F","G","H","J","K","M","P","Q","R","T","V","W","X","Y","2","3","4","6","7","8","9")
     
     ' <--------------- The clever bit !!! (Decrypt the base24 encoded binary data)-------------------------->
     For i = 24 To 0 Step -1
     k = 0
     For j = 14 To 0 Step -1
      k = k * 256 Xor arrDPID(j)
      arrDPID(j) = Int(k / 24)
      k = k Mod 24
     Next
     strProductKey = arrChars(k) & strProductKey
     ' <------- add the "-" between the groups of 5 Char -------->
     If i Mod 5 = 0 And i <> 0 Then strProductKey = "-" & strProductKey
     Next
     strFinalKey = strProductKey
     '
     ' <---------- This part of the script displays operating system Information and the license Key --------->
     '

     Set wshShell=CreateObject("wscript.shell")
     strPopupMsg = strPopupMsg & "Your Windows Product Key is:" & vbNewLine & vbNewLine & strFinalKey
     wshShell.Popup strPopupMsg,,strPopupTitle,vbCancelOnly+vbinformation
     WScript.Quit

     

    copy and paste into notepad....change extension to vbs...

    (this was not my personal code....I extracted it from somewhere else...)

    0
    Comment actions Permalink
  • Adam Ruth

    Thank you for that code. We're are planning on scanning for product keys but haven't gotten to the implementation stage yet.  This should help out.

    0
    Comment actions Permalink
  • Shane Corellian

    This feature was added in 1.1 Release 2. You can see it under the Operating System section of the Computer panel (along with the other OS attributes). You can also access it via the Operating System table in Collections and Reports. The image below shows a Collection which will only contain computers which have "-640-" in their OS Serial Number.

    OEMCollection.png

    0
    Comment actions Permalink

Please sign in to leave a comment.