Video Screencast Help

SOI - Automated Activation with Proxy

Created: 20 Mar 2013 • Updated: 21 Mar 2013 | 6 comments
This issue has been solved. See solution.

I need a solution to automatically activate our desktops right after SOI.

I have seen solutions where you use to set the proxy information.  Does this need to run as a user on the system or can this run as the system credentials (symantec management agent creds)

1. netsh Winhttp set proxy x.x.x.x:port

2. slmgr.vbs /ato

Then after doing this what is the command to remove the netsh command I just applied to the system?

Operating Systems:

Comments 6 CommentsJump to latest comment

Network23's picture

Hi jlawson,

Try it with "run as a user" on the system...

To reset the winhttp proxy setting type:

netsh winhttp reset proxy

This shoud do it..

Network23

jlawson's picture

I'm asking if I need to run the entire task as a user or if I could do it with the agent credentials?

Thomas Baird's picture

agent credentials, yes, but NOT System.  System has no inherent rights to the network.  I could be wrong with SLMGR, but I "think" system has limited rights for that.

Thomas Baird
Looking for opportunities
(translation: unemployed!  LOL)
Yes, able to help people beyond the forum if need be.

 

jlawson's picture

ok but the agent runs on the machine as the system account.  Is there an easy way to define like the local administrator to run as?

jlawson's picture

Ok here is the code I'm using if anyone is interested:

@echo off
echo **********************************************************************
echo *                      Windows 7 Activation                          *
echo **********************************************************************
echo ********************************************************************** >> c:\RISlog\deployment.log
echo **********************************************************************
echo *                      Windows 7 Proxy Setup                         *
echo **********************************************************************
echo %date%,%time%,errorlevel: %errorlevel%,Setup Proxy Settings: Begin >> c:\RISlog\Deployment.log
echo %date%,%time%,errorlevel: %errorlevel%,Setup Proxy Print: Begin >> c:\RISlog\Deployment.log
netsh winhttp show proxy >> c:\RISlog\Deployment.log 2>&1
echo %date%,%time%,errorlevel: %errorlevel%,Setup Proxy Print: End >> c:\RISlog\Deployment.log
echo %date%,%time%,errorlevel: %errorlevel%,Configure Proxy: Begin >> c:\RISlog\Deployment.log
netsh Winhttp set proxy 69.174.58.59:8080 >> c:\RISlog\Deployment.log 2>&1
echo %date%,%time%,errorlevel: %errorlevel%,Configure Proxy: End >> c:\RISlog\Deployment.log
echo %date%,%time%,errorlevel: %errorlevel%,Verify Proxy Print: Begin >> c:\RISlog\Deployment.log
netsh winhttp show proxy >> c:\RISlog\Deployment.log 2>&1
echo %date%,%time%,errorlevel: %errorlevel%,Verify Proxy Print: End >> c:\RISlog\Deployment.log
echo %date%,%time%,errorlevel: %errorlevel%,Setup Proxy Settings: End >> c:\RISlog\Deployment.log
echo **********************************************************************
echo *                      Windows 7 SLMGR /ATO                          *
echo **********************************************************************
echo %date%,%time%,errorlevel: %errorlevel%,Activate Windows: Begin >> c:\RISlog\Deployment.log
cscript %windir%\system32\slmgr.vbs /ato >> c:\RISlog\Deployment.log 2>&1
echo %date%,%time%,errorlevel: %errorlevel%,Activate Windows: End >> c:\RISlog\Deployment.log
echo %date%,%time%,errorlevel: %errorlevel%,Print Licensed Status: Begin >> c:\RISlog\Deployment.log
cscript %windir%\system32\slmgr.vbs /dli >> c:\RISlog\Deployment.log 2>&1
echo %date%,%time%,errorlevel: %errorlevel%,Print Licensed Status: Begin >> c:\RISlog\Deployment.log
echo **********************************************************************
echo *                      Windows 7 Proxy Setup                         *
echo **********************************************************************
echo %date%,%time%,errorlevel: %errorlevel%,Reset Proxy Settings: Begin >> c:\RISlog\Deployment.log
echo %date%,%time%,errorlevel: %errorlevel%,Reset Proxy Print: Begin >> c:\RISlog\Deployment.log
netsh winhttp show proxy >> c:\RISlog\Deployment.log 2>&1
echo %date%,%time%,errorlevel: %errorlevel%,Reset Proxy Print: End >> c:\RISlog\Deployment.log
echo %date%,%time%,errorlevel: %errorlevel%,Reset Proxy: Begin >> c:\RISlog\Deployment.log
netsh winhttp reset proxy >> c:\RISlog\Deployment.log 2>&1
echo %date%,%time%,errorlevel: %errorlevel%,Reset Proxy: End >> c:\RISlog\Deployment.log
echo %date%,%time%,errorlevel: %errorlevel%,Verify Proxy Reset Print: Begin >> c:\RISlog\Deployment.log
netsh winhttp show proxy >> c:\RISlog\Deployment.log 2>&1
echo %date%,%time%,errorlevel: %errorlevel%,Verify Proxy Reset Print: End >> c:\RISlog\Deployment.log
echo %date%,%time%,errorlevel: %errorlevel%,Reset Proxy Settings: End >> c:\RISlog\Deployment.log

I'm running the task as the Symantec Management Agent Credentials.

This successfully activates the machine.

SOLUTION