The key for the version of Windows the PC comes with is stored in the computer's UEFI firmware or BIOS. This system was common for Windows 7 PCs. The one in the registry and key-viewer application is a red herring. The actual key is on a certificate of authenticity (COA) sticker on your PC or its power supply. If your PC uses this, the product key on your PC - the one stored in the registry, and the one key-viewer applications display - will be different from the actual key your PC needs. Crucially, you'll need to grab it from your operating system before you begin reinstalling Windows or it could be deleted if you format your hard drive. You can extract this product key, and - often - enter it when reinstalling Windows on your PC.
The key you need will be in one of three places:
Where Can You Find Your Windows Product Key?