Menu
Web Host Pro logo
  • Home
  • News
  • Servers
  • Websites
  • WordPress
  • Business
Web Host Pro logo
July 7, 2016February 19, 2024

How to find a lost Windows key

Share it here

We recently went to upgrade a laptop hard drive and realized our sticker on the Laptop was worn through. Luckily with a little research, we found a fairly easy trick that will allow any Windows system to get the product key easily.

The first step is to open a notepad. Once it’s open you need to cut and paste this 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

Once you paste the code into your Notepad file you will need to save it, we suggest saving it to your desktop for easy access. When you save the notepad file you need to change the “Save as type” to “All Files”.

Then save the file under the name: productkey.vbs

Once you have saved the file with the correct name and code you simply click the file and will get the local Windows product code.

Connect with us

Web Host Pro

Recent Posts

  • Massive Data Center Upgrade Finished!

    Massive Data Center Upgrade Finished!

  • OpenCart vs. Shopify

    OpenCart vs. Shopify

  • How Web Host Pro Empowers Entrepreneurs

    How Web Host Pro Empowers Entrepreneurs

  • The Best Way to Drive Traffic to Your Website: A Comprehensive Guide

    The Best Way to Drive Traffic to Your Website: A Comprehensive Guide

  • Unveiling Domain Privacy

    Unveiling Domain Privacy

  • Transforming Search With OpenAI

    Transforming Search With OpenAI

  • From Zero to $10K: My Journey to Making Money Online with Affiliate Marketing

    From Zero to $10K: My Journey to Making Money Online with Affiliate Marketing

  • Unlocking Business Efficiency with AI

    Unlocking Business Efficiency with AI

  • Unlocking Your Creativity

    Unlocking Your Creativity

  • Why Remote Work in 2024 is Perfect for Aspiring Digital Nomads

    Why Remote Work in 2024 is Perfect for Aspiring Digital Nomads

  • Unleash Your Inner Lion

    Unleash Your Inner Lion

  • Building a Successful Landing Page with Web Host Pro's SiteJet Website Builder

    Building a Successful Landing Page with Web Host Pro's SiteJet Website Builder

  • Navigating the World of Business Services: Understanding Advertising, Promotion, Publicity, and More

    Navigating the World of Business Services: Understanding Advertising, Promotion, Publicity, and More

  • System Admin Services for cPanel-Based Servers

    System Admin Services for cPanel-Based Servers

  • Using FileZilla and Cyberduck with WordPress

    Using FileZilla and Cyberduck with WordPress

Log in
©2025 Web Host Pro