Sometimes one needs to change the Windows 7 CD key. There are more ways to do so but I’ll present just two simple ways. One of the easiest way is via the shortcut in the System menu (Control Panel > System and Maintenance > System > Change product key) or you could also use the command line tool to do this. Here is what you’ll have to do:
Click Start. Type “command”. Right-click Command Prompt, and then click Run as Administrator.
In the Command Prompt windows, type “slmgr.vbs -upk” and press Enter. This will remove any product key installed.
Then, type “slmgr.vbs -ipk xxxxx-xxxxx-xxxxx-xxxxx-xxxxx” where you’ll replace the x’s with your product key, then press Enter.
After this, to activate Windows 7, type “slmgr.vbs -ato” in the command prompt and press Enter.
Note: You should create System Restore Point before proceeding. If something goes wrong, no need to worry, just restore your system.