Sunday, October 22, 2006

Retrieve your Windows OS Product Keys

Today I needed to get the Windows XP Product Key but didn't have the neccessary information to hand. I did a search and found the MagicJellyBean utility.

This worked but I was curious how it worked. I read around a little bit and discovered a snippet of C# code from Willem's blog.

I then modified it a bit and created my own C# WinForm application.

The application lists the most common product keys (Windows XP and Office) and has a button to search for more keys that look like product ID's. It searches all keys in HKEY_LOCAL_MACHINE.

Here's the source code and here's the binary. Note, the application depends on the .NET Framework 2.0. Also, save the binary before running it otherwise it'll run with restricted permissions and won't be able to probe the registry.

No comments: