/build/static/layout/Breadcrumb_cap_w.png

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


0 Comments   [ + ] Show comments

Answers (1)

Posted by: aragorn.2003 10 years ago
Red Belt
2

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
For more information read the following KB article:
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

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ