1) Goto the path C:\Windows\System32 . Find cmd.exe file & right click to select ‘Run as Administrator’ option.
2) Now type slmgr.vbs /upk . This command uninstalls the current product key. So enter it if necessary, else proceed to next step. You will get a popup message as soon as you enter this command.
3) Then type slmgr.vbs -ipk YOUR-PURCHASED-OR-OEM-PRODUCT-KEY . This command install the new product key.
4) Finally type-in slmgr.vbs -ato for activating your product key.
5) After entering each command, wait for few seconds till the operation completes. Proceed further only when you get a pop-up notification for each command.