We recently acquired a server that's been in use for a while, but no associated software, logins, etc. We attempted to blank the administrator account password, but that didn't work. We also tried some deeper edits on the password, but no avail there either.

Now what I'm looking to do is to re-install windows using the existing registry key on the server now. I've read that you can access the product key in the registry, and using the password tool (a linux boot cd) we are able to view the registry. When I tried this, I got the ProductId (Which version of windows), not the registry key.

The OS I'm attempting to read from in Windows Server 2003 R2.

  • I would be very wary of using the license you get this way without something which says you are eligible to use it. Who's to say they haven't just pirated it? How would you prove it's a paid for key? – WheresAlice Jun 7 '10 at 7:38

Ok I was able to retrieve it using the following:

Download AC2T KeyViewer (http://www.ac2tech.com/tools/keyviewer/keyviewer.zip)

I used a password reset tool (Not sure what it was, it was just the one I've been using for years) which had a registry viewer on the boot CD. I navigated to

Microsoft->Windows NT->Current Version->DigitalProductId

Once I got that value (its really long, about 12 lines of hex), enter the whole thing into the 'Raw Key' tab of the KeyViewer application. It should spit out your Product Key. Note, this does not work in some versions of Windows Server.

Another alternative I've found is the following powershell script:

# create table to convert in base 24
# Read registry Key
$value = (get-itemproperty "HKLM:\\SOFTWARE\Microsoft\Windows NT\CurrentVersion").digitalproductid[0x34..0x42]
# Convert in Hexa to show you the Raw Key
$hexa = ""
$value | foreach {
  $hexa = $_.ToString("X2") + $hexa
"Raw Key Big Endian: $hexa"

# find the Product Key
$ProductKey = ""
for ($i = 24; $i -ge 0; $i--) {
  $r = 0
  for ($j = 14; $j -ge 0; $j--) {
    $r = ($r * 256) -bxor $value[$j]
    $value[$j] = [math]::Floor([double]($r/24))
    $r = $r % 24
  $ProductKey = $map[$r] + $ProductKey 
  if (($i % 5) -eq 0 -and $i -ne 0) {
    $ProductKey = "-" + $ProductKey
"Product Key: $ProductKey"

In this script, you can replace the $value variable with the following:

  1. Locate the memory locations 34 to 42 in the registry value above from the machine that will not boot.
  2. Convert each pair of numbers to decimal (ie. A1=161)
  3. Build an array with those values eg. $value = (161,...)

Running the script then return your product key.

| improve this answer | |

If there's no OEM license sticker on the box (and surely there isn't, or you wouldn't be here), then the product key is obtainable from Microsoft's Volume Licensing Services site or perhaps even your reseller.

| improve this answer | |
  • +1 on the proviso that you need to know your account details. At one company we ended up with multiple accounts at that website, one for each product we'd bought. – WheresAlice Jun 7 '10 at 7:34

I'm not entirely clear if you were successful in clearing the administrator password.

This site -> http://www.petri.co.il/forgot_administrator_password.htm <- has to be the most useful one I've ever found for problems of old servers and machines where the password has been lost.

There is an excellent bootable Linux image you can download there which lets you reset the administrator password with simplicity. I've used it many times and it has always worked.

Once that's done and you can log into Windows we can tackle the problem of your Windows key.

You'll get it easily using a tool like BelArc or Magical Jellybean key finder.

| improve this answer | |

Is this server a DC? There are ways to access the registry remotely, but those would need some type of credentials. If it's just a member i server, i suggest using a utility such as Change NT password to reset the account and pull the key using something like Magic Jellybean Keyfinder.

| improve this answer | |

You should be able to run something like Magic Jellybean Keyfinder from a winPE disk.

| improve this answer | |
  • Only useful if you can get into the machine. They can't. – Mark Henderson Jul 10 '09 at 6:22

I've always used http://www.magicaljellybean.com/keyfinder/ to pull product keys from the registry. You can also load keys from a remote hive for a non-running install. Either yank the drive and toss it in a working vista/xp/2003 box, or try running WinPE on the locked box and running from there.

| improve this answer | |
  • 2
    This would work, but the drive is in RAID with a few others. – dubRun Jul 9 '09 at 16:31

Everyone has mentioned MagicJellyBean which works quite well...

Another piece of software that works well for retrieving the keys for all types of different software on a PC is Belarc Advisor:


The Belarc Advisor builds a detailed profile of your installed software and hardware, missing Microsoft hotfixes, anti-virus status, CIS (Center for Internet Security) benchmarks, and displays the results in your Web browser.

I find it useful for figuring out what is installed on a server (so I can reinstall) and what keys I need to reinstall.

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.