Need Help decoding Vista and Win7 Product IDS

AtYourService

Member
Reaction score
12
Location
CT
Working on my program and trying to finish up the productID decoder that decodes the registry key to what type of windows version it is, I need more examples to determine vista/win7 version


Code:
HKEY_LOCAL_MACHINE\Software\Microsoft\WindowsNT\Current Version\
"ProductID"
^its the first 5chars and the 2nd 3chars that i need

00428 = Windows 7 - Ultimate Edition RC 32-bit
00447 = Windows 7 - Ultimate Edition RC 64-bit
89578 = Vista Home Premium
89587 = Vista Ultimate 64-Bit???



getkey.jpg


if you have vista or win7 you can run its vbs script and it will output the info ineed to a text file in the same directory that its run in

Code:
Dim strValueData

strComputer = "."
Set fso = CreateObject("Scripting.FileSystemObject")
Set TxtFile = fso.CreateTextFile("Info.txt", True)
Set WshShell = WScript.CreateObject("WScript.Shell")
Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colOperatingSystems = objWMIService.ExecQuery _
    ("Select * from Win32_OperatingSystem")

For Each objOperatingSystem in colOperatingSystems
    TxtFile.WriteLine "ProductName: " & objOperatingSystem.Caption

strValueData = objOperatingSystem.SerialNumber
strValueData = Left(strValueData, Len(strValueData) - 14)



    TxtFile.WriteLine "ProductId: " & strValueData
Next
TxtFile.Close

it will look something like this
ProductName: Microsoft Windows 7 Ultimate
ProductId: 00428-321
 
I'll run it later today, bit busy atm

EDIT:

Spare 5 minutes:

ProductName: Microsoft® Windows Vista™ Home Premium
ProductId: 89578-OEM
 
Last edited:
Back
Top