Script to intall software (Sophos Antivirus)

badabing1
badabing1 used Ask the Experts™
on
hi i got the below script from this link, i need to know how i can install sophos AV on a machine without admin rights? basically can someone edit this script for a logon user that i can use to install with admin rights please?
 

https://www.sophos.com/en-us/support/knowledgebase/13090.aspx


@ECHO OFF
 REM --- Check for an existing installation of Sophos AutoUpdate on 32-bit (the 'Sophos AutoUpdate Service' process)
 IF EXIST "C:\Program Files\Sophos\AutoUpdate\ALsvc.exe" goto _End
 REM --- Check for an existing installation of Sophos AutoUpdate on 64-bit (the 'Sophos AutoUpdate Service' process)
 IF EXIST "C:\Program Files (x86)\Sophos\AutoUpdate\ALSVC.exe" goto _End
 REM --- Check for an existing installation of Sophos Anti-Virus on 2003/XP (the SAV adapter config file)
 IF EXIST "C:\Documents and Settings\All Users\Application Data\Sophos\Remote Management System\3\Agent\AdapterStorage\SAV\SAVAdapterConfig" goto _End
 REM --- Check for an existing installation of Sophos Anti-Virus on Vista+ (the SAV adapter config file)
 IF EXIST "C:\ProgramData\Sophos\Remote Management System\3\Agent\AdapterStorage\SAV\SAVAdapterConfig" goto _End
 REM --- Deploy to Windows 2000/XP/2003/Vista/Windows7/2008/2008-R2
 \\SERVER\SophosUpdate\CIDs\Sxxx\SAVSCFXP\Setup.exe -updp "\\SERVER\SophosUpdate\CIDs\Sxxx\SAVSCFXP" -user USER -pwd PWD -mng yes
 REM --- End of the script
 :_End


Thanks
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
NVITEnd-user support

Commented:
Without admin rights or System rights, you can't install many programs, especially programs like antivirus

Author

Commented:
i know, thats why i am asking is it possible to install the software with admin rights and add to this script?

so basically it logs on with admin rights like net logon user something.....

cheers
Tech Lead (Windows), Endpoint Device Management Services
Commented:
Hi badabing1,  pretty much every way to execute this script will involve a variation of one of the below:

1. execute it manually on every computer by either:
    a) right-click (or shift rt-click) the batch file and run as another user by entering credentials at the time
    b) hard code in plain text in the script a username and password with local admin rights so that it executes using RunAS or similar and then click the script on every computer.

2. In a domain environment, use computer logon scripts that run as SYSTEM.  For this to work the computer account (or Domain Computers group) needs read and execute rights to the share \\SERVER\SophosUpdate

3. Use a deployment tool like SCCM, Symantec ITMS, LanDesk etc to schedule the elevated execution via a policy based execution.

It's not normally a good idea to hard code the admin password in a batch file as these things have a habit of leaking (by which I mean users can find the flash drive or similar and discover the credentials).  If you are choosing to walk to each workstation and execute the batch file, then I think you should enter the credentials each time.

regards,
Daz.
Ensure you’re charging the right price for your IT

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

NVITEnd-user support

Commented:
@badabing
To clarify Naz's #2... That would be done with the default domain group policy, or similar OU.

One 3rd party tool I like is PDQ Deploy. Easy to setup and use. Can also be installed on a workstation.

The free version may suffice in your case.
http://www.adminarsenal.com/pdq-deploy/
Sudeep SharmaTechnical Designer

Commented:
I was just wondering, why can't you use Sophos Enterprise Console to install the clients?

Why there is a need of script to install the clients?

Sudeep

Author

Commented:
Hi Sudeep,

sometimes this fails to install so i want to use script as a second option to check if AV is installed.
Sudeep SharmaTechnical Designer

Commented:
What errors you are getting while installing it from the Sophos Enterprise Console?

Are you making sure that the services required to install the Sophos client are started before pushing the agent from Console?

It requires three services like Remote registry, task scheduler and workstation service and server service running before you push the agents.

Sudeep

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial