General discussion

Locked

Find Windows keycode from DOS

By PCTech In AZ ·
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.

This conversation is currently closed to new comments.

9 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Find Windows keycode from DOS

by TheChas In reply to Find Windows keycode from ...

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

Collapse -

Find Windows keycode from DOS

by PCTech In AZ In reply to Find Windows keycode from ...

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.

Collapse -

Find Windows keycode from DOS

by queen1 In reply to Find Windows keycode from ...

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 :)

Collapse -

Find Windows keycode from DOS

by PCTech In AZ In reply to Find Windows keycode from ...

We can't get into windows.

Collapse -

Find Windows keycode from DOS

by NetTek In reply to Find Windows keycode from ...

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.

Collapse -

Find Windows keycode from DOS

by PCTech In AZ In reply to Find Windows keycode from ...

Poster rated this answer

Collapse -

Find Windows keycode from DOS

by phil.hall In reply to Find Windows keycode from ...

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:<wherever the system.dat file is located> /R:<wherever the user.dat file is located> /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.

Collapse -

Find Windows keycode from DOS

by PCTech In AZ In reply to Find Windows keycode from ...

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!!!

Collapse -

Find Windows keycode from DOS

by PCTech In AZ In reply to Find Windows keycode from ...

This question was closed by the author

Back to Windows Forum
9 total posts (Page 1 of 1)  

Related Discussions

Related Forums