Attempting to run unattended .BAT script
I am attempting to install Sophos Endpoint Agent via a simple .BAT script after uninstalling Symantec. The uninstallation of Symantec and the subsequent reboot of the system works fine, but after the reboot, the second script to install Sophos will be pushed but does not launch. The script to run Sophos is as such:
@echo off
:install
mkdir C:\sophos
cd C:\sophos
copy \\SERVER\SophosSetup.exe C:\sophos\SophosSetup.exe
SophosSetup.exe --quiet
goto end
:end
If I run it manually, it works fine, but if I attempt to run it unattended, it just sits in the Quest/Kace directory. I am attempting to run this through the Scripts feature from my K1000 SMA, which is set up as such:
Task 1
Attempts: | |
On Failure: | Break Continue |
Verify
On Success
- Run the batch file “Sophos.bat” with params “”.
Answers (2)
Top Answer
This line:
copy \\SERVER\SophosSetup.exe C:\sophos\SophosSetup.exe
Won't work in most circumstances because the agent doesn't have access to the server unless you are running the script as a different user. Upload the SophosSetup.exe as a dependency and run it from the dependency directory instead.
Run batch files silently using a Scheduled Task
- Type “Task Scheduler” in the Cortana box, and you should see the app listed. ...
- On the last pane on the right-hand side, look for an option which says Create Basic Task. ...
- This launches a wizard which will ask you. ...
- Using this, you can add everything a bat file would need.