Backup Windows product key in Windows 8 (VBScript)


This script sample shows how to get and backup Windows product key in Windows 8 or higher version.

For the scripts of Windows 10 version, please visit urls below


Sometimes a user may want to reinstall operating system, but he does not know the current Windows product key. This script can solve that.


Step 1: Double-click the script, it will show message as following.

Step 2: Press Yes to save Windows product key to a file.

Here are some code snippets for your references.

VB Script
Current= 0 
    j = 14 
       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+ 11) & KeyOutput 
    Last = Current


Windows 8 or later version