Here is the easiest way and it is certain to work:
Go through the following steps:
*Buy the license first.
*Download Key Update Tool, a utility provided by Microsoft to change the key of the Windows version installed.
*The download address is http://go.microsoft.com/fwlink/?LinkId=50346&clcid=0x409
*Double-click the utility will then check the system files.
*Enter the official key and click Next.
*Accept the license agreement and click Next.
*The key is legalized.