How do the OEM vendors activate their Windows machines? They receive a certificate from Microsoft which they apply to the computer in the installation process (often done by you) and when the computer is activated, the certificate is deleted. However, it’s possible to extract the certificate from the installation media and activate the computer yourself. This is very useful if you want to downgrade Windows 8 Pro to Windows 7 Pro. The license allows you to downgrade Windows 8 to Windows 7 but you will need a key for it. Another scenario where this could be useful is if you don’t like the image version of Windows that the OEM vendors gives you since it’s often overfilled with bloatware and you want to reinstall Windows with your own Windows 7 Professional media but want to use a customer’s product key. This is where this small script comes in handy. However, just remember that this requires that your computer is OEM-produced since Windows will check this against BIOS so this won’t work if you build your hardware.
The script simply creates a directory in your Windows folder where the certificate files should be stored then copies the certificate, activates the certificate against the Windows activation service and last injects an OEM product key which will be activated against the certificate. No internet connection required! This script was created for HP hardware but it doesn’t actually matter, it could work on other brands as well. And HP has about 10 different certificates (this one is the most common). It’s about finding the certificate that matches your BIOS.
Enough talking, here’s the script:
md “%Windir%\Setup\scripts\Certificates\”
copy “%Windir%\Setup\scripts\Certificates\”
cscript “%Windir%\System32\slmgr.vbs” -ipk XXXXX-XXXXX-XXXXX-XXXXX-XXXXX (insert the key here)
cscript “%Windir%\System32\slmgr.vbs” -ilc “%Windir%\Setup\scripts\Certificates\HP.XRM-MS” /f
HP.XRM-MS is the certificate file.
Just create a file named activate.cmd and paste this. So where to get the keys and the certificates? You could extract it from the media yourself but someone else has often already done that for you. The most complete website I have found with product keys and certificates is this. You can download all the files you need from that project here. Simply extract the 7.zip-file and find your proper certificate in $oem$\$$\Setup\scripts\Certificates and your proper license key in $oem$\$$\Setup\scripts\oemscan.ini.
Once you have the script in activate.cmd with the correct license key for your vendor in it and the proper certificate copied to the same folder as the script. Just run activate.cmd to launch and activate!
Note 1: This was created for an x86-installation. You might need to modify it if you’re running an x64-bit OS.
Note 2: If you want to create a script to activate different OEM hardware, there’s no problem running the script several times on the same machine. Once Windows has been activated, you can’t break the activation by running the script several times with different vendors. The only way to break the activation is to change the hardware.