Recently my windows 7 installation broke and refuse to boot (see here).

I wish to reinstall but only have 1 cd key.

Is there a way to retrieve my current cd key with the use of only command prompt or linux live disk?

Note: I am unable to boot into windows 7 but do have access to a minimal command prompt in recovery menu. (safe mode wont boot).

4 Answers 4


No, you cannot do it from WinRE command line

Connect the non bootable drive to another Windows PC using a usb to hard drive adapter, install Product Key on the Host PC, run Product key and use File > Select Source.

When the new window opens tick the third radio button, browse to the Windows folder on the non boot drive and hit ok.

enter image description here

  • NB: if you already have an old copy of ProduKey, make sure that it is version 1.35 or later (or get the latest version) because before 1.35, it could only recover the key of the booted OS; 1.35 introduced the option of scanning other Windows installations.
    – Synetech
    Jul 8, 2011 at 0:10
  • I am getting product key was not found Aug 28, 2011 at 1:46
  • 2
    try external registry hive, browse to the Windows\System32\config folder of the attached drive, select "software"
    – Moab
    Aug 28, 2011 at 4:05

I've had really good success with the Magic Jelly Bean KeyFinder tool with MS-Windows 7 (32-bit and 64-bit editions), plus other versions of MS-Windows and most MS-Office products too:

  Magic Jelly Bean KeyFinder

enter image description here


It is possible to get the key from a Linux live disk (e.g. a Ubuntu Live DVD ), or any linux system that has access to the computer's drive (booted from usb, dual booted etc) - this may also be possible from another windows system without third party apps (example). Then you can get the licence by:

  1. Get a registry reading/editing tool. I used chntpw, it is currently available in the Fedora and Ubuntu software repositories.

  2. Get the registry data. You will need the file that contains the registry data from HKLM\SOFTWARE, this should be located at /Windows/System32/config/SOFTWARE (text case may vary, could be /WINDOWS/system32/config/SOFTWARE etc). If you can read the hard disk this should be accessible

  3. Extract the data. Run chntpw with the path to the registry file - e.g. with the windows partition mounted on /mnt:

    chntpw -e /mnt/Windows/System32/config/SOFTWARE

    And get the data from the HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\DigitalProductId key - you may be able to use dpi command, otherwise you can read the key data directly using hex Microsoft\Windows NT\CurrentVersion\DigitalProductId.

If you don't succeed, you could check the hardware to see if it has the key embedded using the answers here. Or check for a sticker that came with the computer with the licence key written on.

Also if the Windows is a retail or OEM licence, you may just find a unique ID as the key is for use one time only.

More info:


Use Hiren's Boot CD. You could also download each tool individually, but might as well grab the CD and the boat load of recovery tools.

  • 2
    If you edit your answer to include a link to that tool, and the tool has a Windows 7 Product Key Recovery tool, I will vote "up" for this answer. Jul 8, 2011 at 0:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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