How to quietly run SLMGR silently for Vista and Windows 7

Author:
phil
Created:
Tuesday, November 09th, 2010
Last Updated:
Friday, January 13th, 2012

Disclaimer: Accessing the information on this page means you agree to the Sites Terms of Service


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 : )

Post Comment

Comments

This is really awesome. Save me a lot of time rather than go through the My Computer. Thanks a lot.

Thank you for the post this is the first location I could find a silent install.

I am quite a novice so can you tell me how can I create .cmd file by my own

Great, Thanks

Works like a charm. Thanks!
I needed this for a small number of Windows 7 cleints, deployed through SCCM Task Sequences.

Thanks it just works GREAT!

Thanks for this, saved me a lot of time and works great.

Hi! I found this page to see if i could activate my copy of Vista, but it doesnt work, sorry folks but dont waste your time