In an elevated Command Prompt, type:
slmgr.vbs -ipk XXXXX-XXXXX-XXXXX-XXXXX-XXXXX windows 7 ultimate activate cmd
This command will activate Windows 7 Ultimate using the product key you entered earlier. In an elevated Command Prompt, type: slmgr
This method is the standard way to input your license key using the command line interface. In an elevated Command Prompt