Good day all,

I'm running to a problem with a post-install task to activate Win7. It's a volume license using MAK.

The first question I have is the proper syntax of the script. Per Windows, the script is:

cscript C:\Windows\System32\slmgr.vbs /IPK xxxxx-xxxxx-xxxxx-xxxxx-xxxxx (/ipk
cscript C:\Windows\System32\slmgr.vbs /ato (/ato)

Per at least one post I've seen here, and elsewhere, the syntax is:

cscript C:\Windows\System32\slmgr.vbs -IPK xxxxx-xxxxx-xxxxx-xxxxx-xxxxx  (-ipk)
cscript C:\Windows\System32\slmgr.vbs -ato (-ato)

Which one is correct, or is it varied depending on how the script is called?

Secondly, and I don't have the log, but watching the post installation tasks get installed, the cmd window pops up and it looks like the first argument passes, as it indicates the license was successfully applied. Then the second window comes up and very quickly it's gone, the task is marked failed, and it moves onto the next task.

There isn't a firewall or proxy in place, so I'm not sure how to troubleshoot this from a network communication standpoint.


-- Ray
Answer Summary:
0 Comments   [ + ] Show Comments


Please log in to comment

Answer Chosen by the Author

create a batch script, you are probably failing due to the second command is trying to process and first is not closed out

I use this for my laptops to activate mak post

start /wait cscript %SystemRoot%\System32\slmgr.vbs -IPK xxxxx-xxxxx-xxxxx-xxxxx-xxxxx
start /wait cscript %SystemRoot%\System32\slmgr.vbs -ATO

Answered 02/05/2016 by: SMal.tmcc
Red Belt

  • use the start /wait to keep them in sequence
    • Thank you. I kind of had a feeling I needed a pause but hadn't gotten that far in determining if and how.

      I will try this.
    • Thank you so much. That was exactly what I need!
      • can you mark this answered
Please log in to comment


Answer this question or Comment on this question for clarity
Admin Script Editor
Admin Script Editor is an integrated scripting environment available free here at ITNinja