Jump to content

Recommended Posts

Posted

So I have a logon .bat script that looks like this:

cd \
if exist "C:\Program Files (x86)\Sophos\AutoUpdate\license_agreements.txt" (
GOTO end
) Else (
REM    pause
       ping 127.0.0.1 -n 20 > nul
       echo setting proxy...
       netsh winhttp set proxy proxy-server=proxy.gfl.suffolk.org.uk:8084
       ping 127.0.0.1 -n 10 > nul
REM    pause
REM    echo wait for 5 seconds
REM    ping 127.0.0.1 -n 5 > nul
REM    pause
       echo beginning sophos install
       \\DC-SVR2\Software$\Sophos\SophosInstall.exe -q -tps remove
REM    pause
REM    echo waiting for 10 minutes
REM    ping 127.0.0.1 -n 600 > nul
REM    pause
       echo resetting proxy
       netsh winhttp reset proxy
       )
:end

I will try to keep this simple so I don't give misinformation

ON SERVER

 

  • running the script allows it to install on our servers
  • setting winhttp proxy manually and then running the exe allows in to install on servers

ON WORKSTATION

 

  • setting it as a logon script causes it to fail on workstations (cannot connect to internet)
  • running the script manually on a workstation causes it to fail (cannot connect to internet)
  • setting winhttp proxy manually on workstations and running exe causes it to fail (cannot connect to internet)

So what is different between it connecting to the internet on our server vs a workstation?

any thoughts appreciated...

 

Side question can someone explain winhttp proxy to me and why is it different from the normal proxy you set?

Posted (edited)

I haven't tried via a proxy so I can't really help with that, however, have you looked at creating a "full" offline installer? We took this route as we felt it was more efficient than each machine downloading the full client each time.

 

There's a very easy KB for it https://community.sophos.com/kb/en-us/121318

 

You'll probably still need some degree of internet comms during the install, however the initial hit will be lower.

Edited by Arcolite
Posted

SOLVED

 

Thanks for the reply, solved it in the end. just proxy being awkward, whats new.

 

Why is was not working

 

Netsh winhttp import proxy source=ie will change the proxy config in system32 by default and so then running the installer on a 64bit system will fail.

As part of script you need to

1. Set winhttp proxy (as above)

2. Change dir to c:\windows\syswow64

3. Set winhttp proxy again (run same line as above)

  • 1 month later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...