Recently on Blog
Top Posts
Ads
(Yet Another) Product Key Number Finder for Windows
Sometimes we need to get Windows Product Key Number from installed system because COA label is damaged or missing. The easiest way to do it is using Windows Product Key Finder and you can find plenty of them on the net. I've created another one which is really simple to use and portable without need to install on the target system.
The reason why I've created another key finder is that I needed simple one without need to get it installed (with creepy adware).
Source code available: Product Key Finder is written in C# and you can check it's source code on GitHub if you want.
Or you can just simple download it and give it a try:
- Download my Windows Product Key Finder (yet another tool like that ;).
Ads
Product Key Numbers and Notebooks with Windows 8 and up
There may be problem with product key numbers if you try to get them from notebooks that were shipped with Windows 8 or up. Since Windows 8, system manufacturers can embed their activation codes into BIOS so there are no more COA labels placed anywhere on the notebooks. This is also the reason why you are not prompted to enter the key even during the fresh install of Windows and the system is then activated properly.Windows 10 Upgrade Product Key Numbers
Also don't forget that Windows 10 upgrade from previous version of Windows 7/8/8.1 has generic product key that looks like this:- Windows 10 Home - YTMG3-N6DKC-DKB77-7M9GH-8HVX7
- Windows 10 Pro - VK7JG-NPHTM-C97JM-9MPGT-3V66T
- Windows 10 Home SL- BT79Q-G7N6G-PGBYW-4YWX6-6F4BT
- Windows 10 Pro VL-MAK - QJNXR-7D97Q-K7WH4-RYWQ8-6MT6Y
Ads
I'm just learning how to code in .Net (C#) and I'm still very much a novice ... so please ignore me if I am demonstrating ignorance, but I found that for the behaviour I desire using KeyDecoder.cs I needed to change:
var key = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine,
RegistryView.Default);
To:
var key = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine,
RegistryView.Registry64);
(So I can use in a Console app. set to AnyCPU ... and I tested this on a 32bit Windows 10 machine (64bit CPU though) and it seemed to work fine).
Again, thank you ... and apologies if I am suggesting something silly out of ignorance.
Kind Regards
Dave (Stockport, UK).
Great! This is the first time that I get the correct key from Windows 10 using DigitalProductID.
My question is, does that key have any use?
Can I use it to activate Windows 10 if Windows doesn't detect it automatically?
1. If you allow "DigitalProductID" to be valid, this allows your code to work with other Microsoft products without throwing an exception over the lowercase 'd' versus uppercase 'D'.
2. The check for isWin8 in DecodeProductKeyWin8AndUp() keeps only bit 0 after dividing by 6. The next line is expecting isWin8 to be greater than 1, but it cannot be. This gives the appearance that setting isWin8 to either 0 or 1 is not correct. I do not have a Windows 8 system to test what should be done to fix this.
3. The ProductId value can be converted to a string with a single function, and manipulated slightly with DecodeProductKeyWin8AndUp() to produce strings with the letter 'N' in its correct place. This snippet can be used:
private const string digits = "BCDFGHJKMPQRTVWXY2346789";
/// <summary>
/// Decodes Windows Product Key from the DigitalProductId.
/// This method applies to DigitalProductId from Windows 7 or lower versions of Windows.
/// </summary>
/// <param name="digitalProductId">DigitalProductId to decode</param>
/// <returns>Decoded Windows Product Key as a string</returns>
private static string DecodeProductKey(byte[] digitalProductId)
{
var key = DecodeProductKeyIntoString(digitalProductId);
for (var i = 5; i < key.Length; i += 6)
{
key = key.Insert(i, "-");
}
return key;
}
/// <summary>
/// Decodes Windows Product Key from the DigitalProductId.
/// This method applies to DigitalProductId from Windows 8 or newer versions of Windows.
/// </summary>
/// <param name="digitalProductId">DigitalProductId to decode</param>
/// <returns>Decoded Windows Product Key as a string</returns>
public static string DecodeProductKeyWin8AndUp(byte[] digitalProductId)
{
var key = String.Empty;
byte isWin8 = (byte)((digitalProduc...
If you want to comment my code or suggest changes, GitHub repo is better to do so.
P.
I suspect that the second one is when the Current OS is upgraded. This happened to me going from Win 7 HP to Win 10 HP. I then put an OEM Win 10 Pro key and it did upgrade but it won't activate. This was created from the MS Media Creation tool free download upgrade. The issue was due to having a digital Product ID versus a Product Key. I had successfully done this on another PC going from Win 7 HP to win 10 HD and also upgrading to win 10 pro but it DID activate. Big M says impossible. I downgraded back to win 7 HP rather than fight with them. I am going to upgrade to win 7 pro and then do the MCT upgrade to Win 10 pro. Buying keys for $200 each is too expensive. I have 7 PCs in my home LAN.
If you follow my story and know something I don't, please enlighten me.
If anybody wants to use it on .NET 2 machines more often, let me know, I can compile .NET 2 version, too.
Hi Pavel, My name is Bruce. I'm a retired IT guy (72 years old) and in my spare time (which I have lots of) I collect old discarded PCs and try to clean them up to give to young kids for their first computer. My preference is to do a clean install of the existing operating system to clean out all the old junk. Therefor it would be nice to be able to read the current existing product key to be used for the fresh O/S installation. Sometimes I'm working with a Win9x machine so capabilities for that would also be welcome. Thanks for the hard work you've put into this project.