Home  >  Article  >  System Tutorial  >  How to Remove Windows 10 Product Key from Registry

How to Remove Windows 10 Product Key from Registry

WBOY
WBOYOriginal
2024-08-01 18:22:54894browse

When Windows 10 installed on your computer, it stored its product key in the registry. But this could leave it vulnerable to being stolen from disclosure attacks by malicious software. Remove the product key from the registry will prevent your product key from being stolen. Before you do this action, it's imperative to back up your product key in a secure location, in case you forgot or lost it. This article will show you how to do.


  • Part 1: Find Windows 10 product key
  • Part 2: Remove Windows 10 Product Key

How to Find Product Key using Notepad in Windows 10

To view the Windows Product Key, you can use a Visual Basic (VB) script that retrieves the key from the registry. The following steps will show you how to create such a script.

Step 1: Create a new Text Document on your computer.

Right-click on the blank area in Desktop or File Explorer, select New > Text Document.

How to Remove Windows 10 Product Key from Registry

Step 2: Then copy and paste in the following bit of code into a Notepad.

Set WshShell = CreateObject("WScript.Shell")
MsgBox ConvertToKey(WshShell.RegRead("HKLMSOFTWAREMicrosoftWindows NTCurrentVersionDigitalProductId"))

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

How to Remove Windows 10 Product Key from Registry

Step 3: Now save the file using the extension .vbs (instead of .txt).

Step 4: To run the script, double-click on the .vbs file. You'll see a popup window with your product key. Hit CTRL + C if you'd like to copy the key.

How to Remove Windows 10 Product Key from Registry

How to Remove Windows 10 Product Key from Registry

To remove the product key from the registry to prevent it from being stolen. Here's how:

Step 1: Open Command Prompt as administrator.

To do: Press Win+X, A in the keyboard. Command Prompt (Admin) window will pop up.

How to Remove Windows 10 Product Key from Registry

Step 2: In command prompt window, input the removing product key: slmgr /cpky command, and then press Enter.

How to Remove Windows 10 Product Key from Registry

Step 3: When it prompts that Product key has been cleared successfully. Click on OK.

How to Remove Windows 10 Product Key from Registry

Step 4: Even if the product key is cleared, you can still view the partial product key.

To do: Execute command:slmgr /dli

How to Remove Windows 10 Product Key from Registry

Look how it displays the partial product key, this information is enough to identify which product key was used for this installation. If you lost the product key, you can recover the product key easily via the Product Key Finder.

The above is the detailed content of How to Remove Windows 10 Product Key from Registry. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn