/build/static/layout/Breadcrumb_cap_w.png

Software Deployment Question


Attempting to run unattended .BAT script

07/22/2020 184 views

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 1trashcan-icon.png

Attempts: 
On Failure:  Break Continue

Verify

  1. Verify that the directory C:\Program Files (x86)\Symantec does not exist.
    trashcan-icon.png

On Success

  1. Run the batch file Sophos.bat with params .
    trashcan-icon.png
Reorder | Add…

Any ideas as to why the .BAT file will not run unattended?  Thank you for any help you can provide
Answer Summary:
0 Comments   [ + ] Show comments

Comments


Answer Chosen by the Author

1

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.




Answered 07/22/2020 by: chucksteel
Red Belt

All Answers

-1

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.
Answered 07/23/2020 by: prince0052
Yellow Belt

 
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