1.    02 Oct 2016 #1
    Join Date : Sep 2015
    Posts : 111
    Windows 10

    Where can I find the Windows Product Key?


    Where can I find the Windows Product Key in the computer?
      My ComputerSystem Spec
  2.    02 Oct 2016 #2
    Join Date : Mar 2016
    Aberdeen
    Posts : 205
    Windows 10

    Quote Originally Posted by mobile1 View Post
    Where can I find the Windows Product Key in the computer?
    Save this as .vbs
    Code:
    Option Explicit   
    Dim objshell,path,DigitalID, Result  
    Set objshell = CreateObject("WScript.Shell") 
    'Set registry key path 
    Path = "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\" 
    'Registry key value 
    DigitalID = objshell.RegRead(Path & "DigitalProductId") 
    Dim ProductName,ProductID,ProductKey,ProductData 
    'Get ProductName, ProductID, ProductKey 
    ProductName = "Product Name: " & objshell.RegRead(Path & "ProductName") 
    ProductID = "Product ID: " & objshell.RegRead(Path & "ProductID") 
    ProductKey = "Installed Key: " & ConvertToKey(DigitalID)  
    ProductData = ProductName  & vbNewLine & ProductID  & vbNewLine & ProductKey 
    'Show messbox if save to a file  
    If vbYes = MsgBox(ProductData  & vblf & vblf & "Save to a file?", vbYesNo + vbQuestion, "BackUp Windows Key Information") then 
       Save ProductData  
    End If 
     
     
     
    'Convert binary to chars 
    Function ConvertToKey(Key) 
        Const KeyOffset = 52 
        Dim isWin8, Maps, i, j, Current, KeyOutput, Last, keypart1, insert 
        'Check if OS is Windows 8 
        isWin8 = (Key(66) \ 6) And 1 
        Key(66) = (Key(66) And &HF7) Or ((isWin8 And 2) * 4) 
        i = 24 
        Maps = "BCDFGHJKMPQRTVWXY2346789" 
        Do 
               Current= 0 
            j = 14 
            Do 
               Current = Current* 256 
               Current = Key(j + KeyOffset) + Current 
               Key(j + KeyOffset) = (Current \ 24) 
               Current=Current Mod 24 
                j = j -1 
            Loop While j >= 0 
            i = i -1 
            KeyOutput = Mid(Maps,Current+ 1, 1) & KeyOutput 
            Last = Current 
        Loop While i >= 0  
         
        If (isWin8 = 1) Then 
            keypart1 = Mid(KeyOutput, 2, Last) 
            insert = "N" 
            KeyOutput = Replace(KeyOutput, keypart1, keypart1 & insert, 2, 1, 0) 
            If Last = 0 Then KeyOutput = insert & KeyOutput 
        End If     
         
     
        ConvertToKey = Mid(KeyOutput, 1, 5) & "-" & Mid(KeyOutput, 6, 5) & "-" & Mid(KeyOutput, 11, 5) & "-" & Mid(KeyOutput, 16, 5) & "-" & Mid(KeyOutput, 21, 5) 
        
         
    End Function 
    'Save data to a file 
    Function Save(Data) 
        Dim fso, fName, txt,objshell,UserName 
        Set objshell = CreateObject("wscript.shell") 
        'Get current user name  
        UserName = objshell.ExpandEnvironmentStrings("%UserName%")  
        'Create a text file on desktop  
        fName = "C:\Users\" & UserName & "\Desktop\WindowsKeyInfo.txt" 
        Set fso = CreateObject("Scripting.FileSystemObject") 
        Set txt = fso.CreateTextFile(fName) 
        txt.Writeline Data 
        txt.Close 
    End Function
    Then run it.
      My ComputerSystem Spec
  3.    02 Oct 2016 #3
    Join Date : Sep 2015
    Posts : 111
    Windows 10
    Thread Starter

    That worked. Thank you.
      My ComputerSystem Spec
  4.    02 Oct 2016 #4
    Join Date : Aug 2014
    Forever West
    Posts : 3,913
    Win10 Home and Pro, Win10 Insider Preview, Win7 Home, Linux Mint

    I tried it and get this [using Notepad]:
    Line: 71
    Char: 9
    Error: Expected Statement
    Code: 800A0400
    Source: Microsoft VBScript compilation error
      My ComputerSystem Spec
  5.    02 Oct 2016 #5
    Join Date : Mar 2016
    Aberdeen
    Posts : 205
    Windows 10

    Quote Originally Posted by Berton View Post
    I tried it and get this [using Notepad]:
    Line: 71
    Char: 9
    Error: Expected Statement
    Code: 800A0400
    Source: Microsoft VBScript compilation error
    Try it again, copy and paste. You probably inadvertently left something out.
      My ComputerSystem Spec
  6.    03 Oct 2016 #6
    Join Date : Aug 2014
    Forever West
    Posts : 3,913
    Win10 Home and Pro, Win10 Insider Preview, Win7 Home, Linux Mint

    I always Copy and Paste just to eliminate possible typing errors, fingers don't always work as designed. Unless Notepad did something.
      My ComputerSystem Spec

 


Similar Threads
Thread Forum
Find original win 8 product keys used?
I entered a few unused retail Win 8 product keys on clean installs to activate Win 10 before July 29th. Is there anyway I could find the underlying product key for each of my systems?
Windows Updates and Activation
Solved How to find Microsoft Office Professional Plus 2010 Product Key
Windows 10 crashed while updating OS because the power went out. The drive will no longer boot up. I have connected the problem hard drive to another PC's USB port so I can see my files. I am now able to view all of the files. I will be...
Software and Apps
Solved Where can you find the Product Key for a new Win 10 PC
I have just received a new laptop with Windows 10 Home installed. The machine booted up fine and we are all registered, activated and updated (10586). So there was no paperwork with the Product Key nor was it put on a label on the underside of...
General Support
Solved How to find which product key has been used for my installed Windows?
Windows 10 x64 As I have multiple retail license keys, I am unsure which one is in use right now. There are 3rd party key finders that may show the key in use, but I prefer to obtain the key using Windows own tools, if possible. For instance...
Windows Updates and Activation
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd
All times are GMT -5. The time now is 12:07.
Find Us
Twitter Facebook Google+ Ten Forums iOS App Ten Forums Android App



Windows 10 Forums