Discussion Locked

Find Windows keycode from DOS

0 helpful
9 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

We get a lot of old hard drives which we want to wipe out and reinstall. Windows is usually to far gone to try and fix, especially when we're putting the drive on a completely different system. So restoring a backed up registry won't help.
What we'd like to do is somehow read the registry from a DOS prompt off a boot disk and find the "Product Key" before we wipe out the hard drive, so we can reuse it again. There's no other way to get the key code when we're talking about five year old drives that are 1 and 2 gigs each.
The system.dat and user.dat files are still accesable, so maybe we need a binary file reader or something. Any suggestions? Maybe we could use Debug or something.

9 replies

by thechas

This question has been asked before, and I think there is even a TR article on the subject of recovering the product code.

Note: You can only recover the product code for Windows 95 and 98.

CAUTION:
I do not recommend recovering the product code and using it for re-installs on any "commercially" used or sold systems!!!
The product code is part of the user license. Unless you have that piece of paper / CD case, you DO NOT have a legal copy of Windows.

Chas

by pctech in az

I found the other question, but it wasn't answered good either. I realize about licensing, the keycode IS the license whether you have a CD or not. If we have to wipe out a hard drive without recovering the product key, the license is lost anyway.Again, we're talking about really old systems that people give or trade to us. THE STICKER IS NON EXISTENT. That's why we want the keycode off of it to reuse, NOT DUPLICATE ON MULTIPLE SYSTEMS.

by queen1

You can find the the key code by using REGEDIT>HKEY_local_machine>software>microsoft>windows>current version: open the current version folder and read down the list, You'll see the the product id and the product key. You can change the registration there also.

Hope that helps :)

by nettek

I am assuming you are talking about Windows 95 or 98? You may want to try adding one of these drives to a good PC as a slave drive, boot to MS-DOS mode, and then run regedit.exe from a command prompt. I would run regedit.exe /? first, to make sure you get the correct switches.

I also agree with the above answers when refering to licensing. If these are OEM versions, you cannot reuse them on other PCs. They are only good on the PC they came with.

by phil.hall

You can read the Registry from DOS. Follow this procedure.

(1) boot the system with a bootable floppy that has regedit.exe on it, you might want to have expanded/exteneded memory enabled as well (that's up to you. Or, if you're able, boot to "Command Prompt Only" from the start-up menu.
(2) type this line in at the DOS prompt (no quotes): "regedit /L: /R: /E c:\reg.txt HKEY_local_machine\software\microsoft\windows\currentversion" [all that should be on one line]
(3) now, on your C:\ there will be a file named reg.txt and in that file you should find your keycode.

In my example, I didn't tell you the exact path for where your registry files are located bacause I can't be sure if this system has them in the "normal" location, but if it is then that would be "C:\Windows". Put the path in the angle brackets above, making sure to append each with the /L: and /R: as is corrent for your system.

by pctech in az

This works when done right. You have to provide the path including the file name. Like this "regedit /L:c:\windows\system.dat /r:c:\windows\user.dat /e c:\reg.txt hkey_local_machine\software\microsoft\windows\currentversion"

Unfortunately, this exceeds the command line character limit. But it works well leaving it at "software\microsoft\windows" and not putting "currentversion". The file is much longer, but the keycode is right on the top. Thanks!!!

This discussion is closed to new replies.