Thursday, September 1, 2011

Re-installing Pre-installed Windows



If you know what I have been up to these past weekends (and also Eid!) then you'd know that on my laptop, which came installed with Windows 7, I wanted to install Ubuntu, on a separate partition. Basically, I wanted one partition for Windows, one for Ubuntu, one for combined data that's accessible from both of these OSes, and the fourth one is always used up by system, so one doesn't really have choice.

So you have got your new laptop and it came pre installed with windows 7. You're happy you got the original windows, no pirated software for you! At least no pirated operating system. Anyway, so you're having a look and there is plenty of applications already installed. If this is your first time with an OEM (original equipment manufacturer) installed OS, you're like Wow! so many apps to explore. But if you're experienced, or it's been a week or more since you've been 'exploring' your system, you either already know what Bloatware is or you're uninstalling the crap that sponsored your OEM and installing your favorite software.

One way to get rid of all the bloatware is to un-install all the software you don't want. That's all nice and good, but what if you run later wanna re-install windows? You'd do the entire uninstall-crapware-install-favoriteware thing again? Exactly.





This is not the only scenario that you'd want to re-install your OEM windows in. Earlier in the days, OEMs shipped an installation disc when you bought a copy of windows. Now what they do is that they create a recovery partition in your hard-disk, and should you corrupt your windows you can always recover from Bios to the state that it was shipped in. In case, you want to delete the partition? Almost all OEMs give you an option to backup that recovery partition onto some recovery media (DVDs or USB) so that if you corrupt your system, you can just insert the four DVDs one by one and get your system back to the original state. The trouble comes when you don't have any recovery partition or recovery media, but all you have is the product key stuck at the back of laptop and the internet. You think you can just download a valid, clean iso off the internet, install it, insert your key, and voila! Your Windows is activated? No son, it doesn't work that way. There are two different versions of Windows - an OEM version, which companies like Dell, HP, Acer etc buy in batches, and a Retail version which people like you and me buy. The keys for OEM version are also shipped in batches, and can only activate the OEM installation. Now there's three ways to go about it:

Installing Windows 7 with product key from the sticker:




Method 1:

Look for the OEM windows version of your company, for your pc. If you're lucky, someone would have shared it on torrent and you could just download the iso for which your key would work. I tried Really hard to find such a thing, I didn't find it.




Method 2:

Download a retail version clean Windows 7 iso, and modify it to look like OEM version Windows, burn it to a disk, and install from that. It works, but I haven't tried it.




But here's how to do it anyway. Using any free iso modifier or archiving tool, un-archive the iso image. Goto the sources folder and open up ei.cfg in notepad. Under the [Channel] heading, replace 'Retail' with 'OEM'. And save. You're done. Now create the iso again with ei.cfg modified. And that's it. Though I'd say, after you create the iso, do check /sources/ei.cfg to make sure the change has been saved. Now burn this to a disk and install from there, your product key should work.




Method 3:

This is what I did. Search for HP.xrm-ms file in your computer. Copy it to usb drive. This is XrML Digital License, a proof that HP bought this Windows. This is your license of the windows. Now re-install Windows from the Retail iso, enter your key, and open up an elevated command prompt with administrative privileged and this command:




C:\Windows\system32>slmgr.vbs -ilc c:\hp.xrm-ms




This command assumes that you have an HP machine and you're Xrn-MS file is in C: drive.




Your Windows will be legally and permanently activated! And, no bloatware, enjoy computing!




Saad Rehman