1. #1
    jcgriff2's Avatar
    Join Date
    Feb 2012
    Location
    New Jersey Shore
    Posts
    16,748
    • specs System Specs
      • Manufacturer:
        HP
      • Model Number:
        HP ENVY TouchSmart 17-j130us Notebook - E8A04UA
      • Motherboard:
        HP Insyde 720265-501 6050A2549501-MB-A02
      • CPU:
        Intel Core i7-4700MQ Processor with Turbo Boost up to 3.4GHz.
      • Memory:
        12GB DDR3L SDRAM (2 DIMM)
      • Graphics:
        Intel HD graphics 4600 with up to 1792MB total graphics memory
      • Sound Card:
        Beats Audio quad speakers and two subwoofers
      • Hard Drives:
        1TB 5400RPM hard drive with HP ProtectSmart Hard Drive Protection
      • Disk Drives:
        Hitachi 500 GB SSD; 7 TB USB External
      • Power Supply:
        90w
      • Case:
        Laptop
      • Display:
        17.3-inch diagonal HD+ BrightView LED-backlit touchscreen display (1600 x 900)
      • Operating System:
        Windows 8.1

    Find Windows Product Key Code (VBS Script) (Windows 10, 8.1, 8, 7, Vista)



    Find Windows Product Key Code (VBS Script)

    Run the following VBS script to find out your Windows key code.

    Download the VBS file; save it to Desktop. Double-click on it.

    https://www.sysnative.com/apps/WindowsKeyCode.vbs

    Contents of VBS file
    Code:
    Set WshShell = CreateObject("WScript.Shell")
    MsgBox ConvertToKey(WshShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\DigitalProductId"))
    Function ConvertToKey(Key)
    Const KeyOffset = 52
    i = 28
    Chars = "BCDFGHJKMPQRTVWXY2346789"
    Do
    Cur = 0
    x = 14
    Do
    Cur = Cur * 256
    Cur = Key(x + KeyOffset) + Cur
    Key(x + KeyOffset) = (Cur \ 24) And 255
    Cur = Cur Mod 24
    x = x -1
    Loop While x >= 0
    i = i -1
    KeyOutput = Mid(Chars, Cur + 1, 1) & KeyOutput
    If (((29 - i) Mod 6) = 0) And (i <> -1) Then
    i = i -1
    KeyOutput = "-" & KeyOutput
    End If
    Loop While i >= 0
    ConvertToKey = KeyOutput
    End Function
    Canon and GerryR say thanks for this.


    • Ad Bot

      advertising
      Beep.

        
       

  2. #2
    Digerati's Avatar
    Join Date
    Aug 2012
    Location
    Nebraska, USA
    Posts
    3,601
    • specs System Specs
      • Manufacturer:
        BrightWorks Systems
      • Model Number:
        BWS-6 E-IV
      • Motherboard:
        Gigabyte GA-Z170-HD3
      • CPU:
        Intel Core i5-6600 Skylake Pushed to 3.9GHz
      • Memory:
        2 X 8GB Corsair Vengeance DDR4 3000
      • Graphics:
        EVGA GeForce GTX 1050TI 04G-P4-6251-KR, 4GB GDDR5
      • Sound Card:
        Integrated
      • Disk Drives:
        Samsung 850 Pro 256GB SSD, 850 EVO 250GB SSD, Blu-ray R/W
      • Power Supply:
        EVGA Supernova 550W Gold
      • Case:
        Fractal Design Define R4 Mid Tower w/Window
      • Cooling:
        2 x 140mm case fans, OEM CPU Cooler
      • Display:
        2 x Samsung S24E650BW 24 inch WS
      • Operating System:
        Windows 10 Pro 64-Bit

    Re: Find Windows Product Key Code (VBS Script) (Windows 10, 8.1, 8, 7, Vista)

    Or, just run Speccy and learn all sorts of information about your computer.
    RepairandRestore says thanks for this.
    Bill (AFE7Ret)
    Freedom is NOT Free!
    MS MVP 2007 - 2018

    Heat is the bane of all electronics!

  3. #3
    Wrench97's Avatar
    Join Date
    Feb 2012
    Location
    S.E. Pennsylvania
    Posts
    2,628

    Re: Find Windows Product Key Code (VBS Script) (Windows 10, 8.1, 8, 7, Vista)

    Is there a way to copy it as in copy/paste?

  4. #4
    Digerati's Avatar
    Join Date
    Aug 2012
    Location
    Nebraska, USA
    Posts
    3,601
    • specs System Specs
      • Manufacturer:
        BrightWorks Systems
      • Model Number:
        BWS-6 E-IV
      • Motherboard:
        Gigabyte GA-Z170-HD3
      • CPU:
        Intel Core i5-6600 Skylake Pushed to 3.9GHz
      • Memory:
        2 X 8GB Corsair Vengeance DDR4 3000
      • Graphics:
        EVGA GeForce GTX 1050TI 04G-P4-6251-KR, 4GB GDDR5
      • Sound Card:
        Integrated
      • Disk Drives:
        Samsung 850 Pro 256GB SSD, 850 EVO 250GB SSD, Blu-ray R/W
      • Power Supply:
        EVGA Supernova 550W Gold
      • Case:
        Fractal Design Define R4 Mid Tower w/Window
      • Cooling:
        2 x 140mm case fans, OEM CPU Cooler
      • Display:
        2 x Samsung S24E650BW 24 inch WS
      • Operating System:
        Windows 10 Pro 64-Bit

    Re: Find Windows Product Key Code (VBS Script) (Windows 10, 8.1, 8, 7, Vista)

    JC's script or the key from Speccy?
    Bill (AFE7Ret)
    Freedom is NOT Free!
    MS MVP 2007 - 2018

    Heat is the bane of all electronics!

  5. #5
    Wrench97's Avatar
    Join Date
    Feb 2012
    Location
    S.E. Pennsylvania
    Posts
    2,628

    Re: Find Windows Product Key Code (VBS Script) (Windows 10, 8.1, 8, 7, Vista)

    The key from JC's script output box.

  6. #6

    Re: Find Windows Product Key Code (VBS Script) (Windows 10, 8.1, 8, 7, Vista)

    Quote Originally Posted by Digerati View Post
    Or, just run Speccy and learn all sorts of information about your computer.
    I`ve try it on tree different machines the key didn`t match for none of them ;(
    In a world without fences and walls, who needs Gates and Windows?


  7. #7
    Digerati's Avatar
    Join Date
    Aug 2012
    Location
    Nebraska, USA
    Posts
    3,601
    • specs System Specs
      • Manufacturer:
        BrightWorks Systems
      • Model Number:
        BWS-6 E-IV
      • Motherboard:
        Gigabyte GA-Z170-HD3
      • CPU:
        Intel Core i5-6600 Skylake Pushed to 3.9GHz
      • Memory:
        2 X 8GB Corsair Vengeance DDR4 3000
      • Graphics:
        EVGA GeForce GTX 1050TI 04G-P4-6251-KR, 4GB GDDR5
      • Sound Card:
        Integrated
      • Disk Drives:
        Samsung 850 Pro 256GB SSD, 850 EVO 250GB SSD, Blu-ray R/W
      • Power Supply:
        EVGA Supernova 550W Gold
      • Case:
        Fractal Design Define R4 Mid Tower w/Window
      • Cooling:
        2 x 140mm case fans, OEM CPU Cooler
      • Display:
        2 x Samsung S24E650BW 24 inch WS
      • Operating System:
        Windows 10 Pro 64-Bit

    Re: Find Windows Product Key Code (VBS Script) (Windows 10, 8.1, 8, 7, Vista)

    Make sure you understand the difference between Product ID and Product Key. The ID is what you see when you right click on Computer on your desk top (or press the Windows key + Pause). The Product key, also called Serial number in Speccy (sorry if I confused the issue there) is the big number you enter when you authenticate Windows.
    Bill (AFE7Ret)
    Freedom is NOT Free!
    MS MVP 2007 - 2018

    Heat is the bane of all electronics!

  8. #8

    Re: Find Windows Product Key Code (VBS Script) (Windows 10, 8.1, 8, 7, Vista)

    Quote Originally Posted by Digerati View Post
    Make sure you understand the difference between Product ID and Product Key. The ID is what you see when you right click on Computer on your desk top (or press the Windows key + Pause). The Product key, also called Serial number in Speccy (sorry if I confused the issue there) is the big number you enter when you authenticate Windows.
    Actually it is my fault it is a different script than
    function Get-WindowsKey { ## function to retrieve the Windows Product Key from any PC
    ## by Jakob Bindslet (jakob@bindslet.dk)
    param ($targets = ".")
    $hklm = 2147483650
    $regPath = "Software\Microsoft\Windows NT\CurrentVersion"
    $regValue = "DigitalProductId"
    Foreach ($target in $targets) {
    $productKey = $null
    $win32os = $null
    $wmi = [WMIClass]"\\$target\root\default:stdRegProv"
    $data = $wmi.GetBinaryValue($hklm,$regPath,$regValue)
    $binArray = ($data.uValue)[52..66]
    $charsArray = "B","C","D","F","G","H","J","K","M","P","Q","R","T","V","W","X","Y","2","3","4","6","7","8","9"
    ## decrypt base24 encoded binary data
    For ($i = 24; $i -ge 0; $i--) {
    $k = 0
    For ($j = 14; $j -ge 0; $j--) {
    $k = $k * 256 -bxor $binArray[$j]
    $binArray[$j] = [math]::truncate($k / 24)
    $k = $k % 24
    }
    $productKey = $charsArray[$k] + $productKey
    If (($i % 5 -eq 0) -and ($i -ne 0)) {
    $productKey = "-" + $productKey
    }
    }
    $win32os = Get-WmiObject Win32_OperatingSystem -computer $target
    $obj = New-Object Object
    $obj | Add-Member Noteproperty Computer -value $target
    $obj | Add-Member Noteproperty Caption -value $win32os.Caption
    $obj | Add-Member Noteproperty CSDVersion -value $win32os.CSDVersion
    $obj | Add-Member Noteproperty OSArch -value $win32os.OSArchitecture
    $obj | Add-Member Noteproperty BuildNumber -value $win32os.BuildNumber
    $obj | Add-Member Noteproperty RegisteredTo -value $win32os.RegisteredUser
    $obj | Add-Member Noteproperty ProductID -value $win32os.SerialNumber
    $obj | Add-Member Noteproperty ProductKey -value $productkey
    $obj
    } }
    PS; I`m not trying to steal our clients product keys, sometimes they do not have them as they damaged the sticker :)
    In a world without fences and walls, who needs Gates and Windows?


Similar Threads

  1. How to find your Windows 8/8.1 OEM product key.
    By Go The Power in forum Windows 8 | Windows RT Tutorials
    Replies: 0
    Last Post: 11-21-2014, 05:26 PM
  2. [SOLVED] Vista SP2 | Windows Update Error | Code 80070490
    By G Man in forum Windows Update
    Replies: 5
    Last Post: 04-17-2014, 08:53 AM
  3. [SOLVED] What is a windows vista product key?
    By andycindy in forum Windows 7 | Windows Vista
    Replies: 2
    Last Post: 06-20-2013, 04:18 PM

Log in

Log in