VMware Horizon Community
N74jrw
Enthusiast
Enthusiast

Windows 7 Activation in Horizon View

Hello,

I have a script that runs after recomposing, which is supposed to activate the VM, but it does not. The script is written to activate both Windows and MS Office 2010, however only MS Office gets activated, Windows does not. If I run the script interactively by double-clicking it both items activate without a problem. What am I doing wrong in the process?

Here is the script, a single file ending with a ".bat" extension:

start /wait cscript c:\"program files (x86)\microsoft office"\office14\ospp.vbs /act

start /wait cscript c:\Windows\System32\slmgr.vbs /ato

Thanks in advance

Reply
0 Kudos
8 Replies
bjohn
Hot Shot
Hot Shot

Why is there a need to activate? it should be automatic if you have KMS in place.

Reply
0 Kudos
EricNichols
Hot Shot
Hot Shot

This also failed for us but may have been due to not having enough requests to meet the activation threshold (25) on the KMS server.

CSCRIPT "%WINDIR%\system32\slmgr.vbs" /skms yourkmsservername:1688

CSCRIPT "%WINDIR%\system32\slmgr.vbs" /ipk 33PXH-7Y6KF-2VJC9-XBBR8-HVTHH

CSCRIPT "%WINDIR%\system32\slmgr.vbs" /ato

You might also try this on your golden image and then recompose:

  1. regedit HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\vmware-viewcomposer-ga, change SkipLicenseActivation to 0
  2. If slmgr /dlv shows 0 rearm count then regedit HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform, change SkipRearm to 1
  3. regedit HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\activation\manual  to 0 and NotificationDisabled to 1

The scripts run as the system user. If you use a proxy server, the system user might need to have a proxy specified:

NETSH winhttp SET proxy yourproxyservername:andport

CSCRIPT "%WINDIR%\system32\slmgr.vbs" /skms yourkmsservername:1688

CSCRIPT "%WINDIR%\system32\slmgr.vbs" /ipk 33PXH-7Y6KF-2VJC9-XBBR8-HVTHH

CSCRIPT "%WINDIR%\system32\slmgr.vbs" /ato

NETSH winhttp reset proxy

Reply
0 Kudos
childebrandt
Enthusiast
Enthusiast

If you keep activating and you do not have a KMS server setup you will use up all your activations. Basicly if you have a small environment you need to keep recreating machines till you hit the activation limit. Then it will activate and you can go back down to the correct amount of machines.

Set up a KMS server it will only make your life better down the road.

@childebrandt42
Reply
0 Kudos
N74jrw
Enthusiast
Enthusiast

I don't have a KMS server in place. We use a MAK with our Windows 7 licenses. From what I understand, a KMS is not an option with that type of key. I don't need to re-enter the Windows 7 product key as part of my post-recompose task, just activate. Funny, MS Office 2010 activates without a hitch. Is it the way my script is written. The first step activates office, then "should" go to activate Windows. It almost seems as if it activates Office then just stops. Note, this does not happen when I run the script manually.

Weird and confusing...

Thanks for the suggestions thus far!

Reply
0 Kudos
childebrandt
Enthusiast
Enthusiast

Log into your windows account and look at your activations. This may be your issue.

@childebrandt42
Reply
0 Kudos
EricNichols
Hot Shot
Hot Shot

There is a special key for MAK activations. Its unsupported.

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\vmware-viewcomposer-ga  AllowActivateMAKLicense  set it to 1

You would need to contact Microsoft after your activation count exceeds its limit to have them reset it.

Regarding your script, Ive seen the post recompose scripts time out and just plain fail in certain cases.  You could try setting the ExecScriptTimeout to something longer like 60000.

Reply
0 Kudos
N74jrw
Enthusiast
Enthusiast

Hi,

What does that registry key do, exactly?

Reply
0 Kudos
EricNichols
Hot Shot
Hot Shot

Something in the QuickPrep, Im not sure. Instead of trying to activate with a KMS server, it tries to activate with your MAK license.

If you are really curious, you could interrupt a recompose and mount the hidden disk to a different VM to peek at what instructions are in the quickprep sysprep file and compare two VM's with that setting on and off. Its probably a single line in the sysprep unattended xml file.

Another route is to use a custom sysprep file instead of QuickPrep.

Reply
0 Kudos