How can I run cmd script in elavated mode for activating Win7 on KACE 2000 without user actions?
I have some problems with creating an activation script for windows 7 (mak license).
I have created an Postinstallation Tasks for this, with the following bat script:
"REM Configure Client using VL MAK
cscript c:\windows\system32\slmgr.vbs /ipk <product key>
REM Activate the machine using the VL MAK
cscript c:\windows\system32\slmgr.vbs /ato
"
When I use this in the scripted installation it don't work. The reason for this is that the script must start elavated mode.
When I test the script (created a bat file on the computer) I need to run the script as administrator.
I can't find a solution for this, but I know I'm not the first one with this problem.
Please could someone help me wit this?
Or if there is a better way to activate windos 7 via Kace 2000 postinstallation task, please tell me.
Thanks in advance
Answers (1)
Ho woodyv,
no thats the right way to fire it up using a post installation task. We also use such an install task using MAK, as the last task and use the following code.
@echo off
cls
title Windows 7 Activation
echo 1. Send Dummy Pingtype
ping -n 2 [PUT THE HOSTNAME OF YOUR K1000/K2000 HERE] > %TEMP%\activation.log
echo 2. Disable local Firewall
netsh advfirewall set CurrentProfil state off
echo 3. Activate
cscript %WINDIR%\System32\slmgr.vbs /IPK [PUT YOUR SERIAL NUMBER HERE] >> %TEMP%\activation.log
cscript %WINDIR%\System32\slmgr.vbs /ato >> %TEMP%\activation.log
cscript %WINDIR%\System32\slmgr.vbs /dli >> %TEMP%\activation.log
echo 4. Write Eventlog
eventcreate.exe /T INFORMATION /ID 1000 /L APPLICATION /SO Activation /D "SerialNumber should haven been set and Windows License should have been activated. For more details type slmgr /dli or look at %TEMP%\activation.log"
Please ensure that the following URL can be accessed through Firewall and without Proxy.
- http://go.Microsoft.com/fwlink/?LinkId=4723
- https://SLS.Microsoft.com/
- https://SLS.Microsoft.com:443
- http://CRL.Microsoft.com/PKI/CRL/Products/MicrosoftRootAuthority.CRL
- http://CRL.Microsoft.com/PKI/CRL/Products/MicrosoftProductSecureCommunications.CRL
- http://www.Microsoft.com/PKI/CRL/Products/MicrosoftProductSecureCommunications.CRL
- http://CRL.Microsoft.com/PKI/CRL/Products/MicrosoftProductSecureServer.CRL
- http://www.Microsoft.com/PKI/CRL/Products/MicrosoftProductSecureServer.CRL
- https://Activation.SLS.Microsoft.com
http://support.microsoft.com/kb/921471
Comments:
-
Bedankt voor de reactie, het blijkt inderdaad een FW en Proxy probleem te zijn. - woodyv 10 years ago