When you install and activate a copy of Windows, the product key is stored in the registry. This save can be useful if you want to use a program like ShowKeyPlus to see the installed product key in case you lose it.
However, if the product key you installed is in the registry, it is vulnerable to key detection attacks by malware.
Clearing the product key from the registry will prevent this, but you should make sure that you have a copy of the product key written somewhere and stored in a secure location.
Below we will show you how to permanently remove the product key from the registry to prevent a possible theft in Vista, Windows 7, Windows 8 and Windows 10.
You must be logged in as an administrator before you can remove the product key from the registry.
What we do below will not remove the OEM product key of Windows 8 / 8.1 / 10 that is embedded in the UEFI firmware chip.
So if you run the command slmgr / dli at a command prompt, you will still see the last 5 characters of the installed product key.
Windows Remove a key from the Registry
Open a command prompt window with administrator privileges:
[icon name = ”windows” class = ”” unprefixed_class = ””] + X and click on Command Prompt (Admin).
You can also open the command prompt with administrator privileges from the search by searching for the term cmd.
In the results that will appear, right-click on the black icon and select "open as administrator."
When it opens (regardless of how you used it) copy and paste the following command and press Enter.
Finally click OK when the product key is deleted and you are ready.