Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I recently performed a fresh install of Windows 7 on my computer, but only as I deleted the old partition (that contained my old Windows 7 install) did I remember I hadn't extracted my Windows activation code to re-activate the new copy with (and seeing as I've lost the original packaging, am a little stuck now).

Hopefully, someone has a simple way to restore the old partition, and access the old install's registry, so I might re-obtain the key and re-activate.

EDIT: I forgot to add earlier (see comments) - the disk that I wrote the fresh install to was NOT the same disk that I previously been running Windows on. I simply deleted the partition on the old drive and stopped messing with it after that.

share|improve this question
Have you already re-installed windows, or did you stop as soon as you had deleted the partition from the drive? – Mike Insch Jul 21 '11 at 12:25
as many as u use space on your hard drive u lose the old one data... @active partition recovery to search on hard drive deleted partition and then browse needed files.. – Anotomix Jul 21 '11 at 12:31
@Mike - Sorry, should have mentioned that I actually installed the new copy of windows on a seperate drive (a new SSD), and deleted the old partitions off the other hard drive (haven't reformatted/overwritten anything on the old drives yet, they remain blank). – SalamiArmi Jul 21 '11 at 13:19
Also, @Linker3000 - I don't want to recover files in the traditional sense, I want to recover the registry, which (I'm not sure) may potentially be stored in a strange/different way. – SalamiArmi Jul 21 '11 at 13:22
I originally thought this was totally different, but you may want to read questions here regarding partition recovery. – KCotreau Jul 21 '11 at 13:37
up vote 6 down vote accepted

Since you have not overwritten your original drive, the odds are (slightly) in your favour.

You need to first recover the deleted partition, use a tool like TestDisk, you'll probably be best to use a copy from one of the variaous LiveCD's listed on their site. Be absolutely sure you read and fully understand the documentation before you attempt recovery - if this step does not work, your data will be lost permanently.

Once you have recovered the partition, you can then proceed to use a tool such as Magical Jelly Bean Key Finder to open the registry on your recovered drive and scan for your product keys. I have successfully used this tool to recover keys from registry files stored on alternate hard disks before and can confirm that this works well.

If you manage to recover the partition successfully, your chances of success in recovering your keys are pretty much 100%. If TestDisk (or whatever alternate tool you choose to use) fails to recover your drive then your key is lost.

share|improve this answer
Excellent answer, thank you. Managed to recover my key, everything working great! – SalamiArmi Jul 25 '11 at 12:41

You are in a very tough spot, and you probably will not be able to recover it. I have not tested this, so it is only theory due to the last step, but here is how you would try:

First, if the computer you are using now, is the same one, everything you do risks overwriting the data. So try to move the disk to another computer for access there.

You first need to download and install a data recovery software, like DiskDigger.

After you scan for all the deleted and recoverable files on the disk, you need then need to find the registry hive the key was stored in, which was originally located in C:\Windows\System32\config (this is just for reference, as your file will probably not have a directory associated with it). You would be looking for the one called SYSTEM with no extension. There will likely be multiple copies to try with. Copy that file, or multiple copies, off the disk to the computer you are using to access the disk.

Then you would need to use a program that can read the encrypted location. This is the part I am not sure about because I have never used this software. Most of the key finders (Magic Jellybean Finder, etc.) assume that you want the local system, so you need one that you can specify and pick the registry file. This one claims to do that: (note their note 3: "Load Hive option".

Overall, I don't think you have much chance, but this is the outline of how. Good luck.

share|improve this answer
As I was writing that, I see you posted that you have not written to the disk. That increases your odds greatly. You may also be able to use this as a reference to recover the partition:… – KCotreau Jul 21 '11 at 13:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .