Home > VMware View > Use a Post-Synchronization script to set the Windows 7 key and activate

Use a Post-Synchronization script to set the Windows 7 key and activate

01/04/2012

I had a situation today where the parent desktop image had Kaspersky Anti-Virus installed and I could not modify it.  This product is known for breaking sysprep, so I had to use QuickPrep instead.  The problem I had was that without sysprep, the system was not getting its correct Multi-Access Key nor activating.  To work around this, I put together a tiny batch file that uses slmgr.vbs to set the key and activate.  I was pleasantly surprised to see that the script/batch file was successfully executed from a UNC path, so I did not have to make changes to the parent desktop image.

The batch file contents:

cscript C:\Windows\System32\slmgr.vbs /ipk XXXXX-XXXXX-XXXXX-XXXXX-XXXXX
cscript C:\Windows\System32\slmgr.vbs /ato

Replace XXXXX-XXXXX-XXXXX-XXXXX-XXXXX with your MAK.

Please be aware that the procedure is different when there is a Key Management Server in place with the appropriate Windows 7 Keys ready.

Advertisements
%d bloggers like this: