I ran into a situation where I needed to add the product key and activate windows 7 for several computers in an organization and make it as easy as possible. So, I came up with this easy to use .cmd batch script:
Copy and paste the following into your own "activate.cmd" file and simply run it!
@echo off cls echo Activating Windws 7... Please wait as this might take several minutes... echo. cscript //B "%windir%\system32\slmgr.vbs" /ipk XXXXX-XXXXX-XXXXX-XXXXX-XXXXX cscript //B "%windir%\system32\slmgr.vbs" /ato echo Activation complete!
(Where XXXXX-XXXXX-XXXXX-XXXXX-XXXXX is YOUR product key)
In response to "How to create a .cmd" file, simply create a new text document using notepad.
1) Open notepad
2) Copy the above information and paste it into the notepad window
3) Change the product key to your own
4) Click "File" -> "Save As"
5) In the window that pops up, at the bottom in the "File Name" area, put activate.cmd
6) Below the "File Name", change the "Save As Type" from "Text Documents (*.txt)" to "All Files".
7) Click the Save button
All done! Make sure you know where the file was saving to before you save it : )