Knowledge Base

Using a script to install the Webroot Business Endpoint Protection agent to macOS

  • 5 August 2020
  • 0 replies
  • 7351 views
Using a script to install the Webroot Business Endpoint Protection agent to macOS
Userlevel 4
Badge +15

Below is a script that can be used to deploy the latest version of the Webroot Endpoint agent to any version of macOS.

 

IMPORTANT NOTE: These instructions contain an example shell script and are provided as-is. It should only be used by those experienced with scripts and should be fully tested before use. Webroot Support does not troubleshoot or support scripts and will not answer script functionality related questions.

 

macOS installation script:

#!/bin/sh
#set -x
#Set Keycode for Clients
KEY=1111-1111-1111-1111
#Proxy Settings
#host=X
#port=Y
#user=Z
#password=ZZ

sleep 2

#Get the OS version. We need to execute differently on Catalina than on <Catalina
OS_Version=`sw_vers -productVersion`
echo OS_Version is $OS_Version

clear

#Download WSA mac client
if [[ (${OS_Version} > 10.15) ]];

then
cd /tmp; curl -O https://mac.webrootmultiplatform.com/production/wsa-mac/10.15/latest/WSAMACSME.dmg
echo "Please wait while file is downloaded and mounted"
wait 15

#Mount the DMG file
echo "beginning DMG mount"
hdiutil attach -nobrowse /tmp/wsamacsme.dmg
echo "Mounted DMG"

#Before installing, we need to make sure we remove the InstallHelperTool
sudo rm -f /Library/PrivilegedHelperTools/com.webroot.InstallerHelperTool

#On Catalina, we run the installer that is on the DMG rather than copying to /Applications.
#For new install, we need to keep the keycode and proxy here whereas upgrading (over existing installation) does not need the keycode
sudo /Volumes/Webroot\ SecureAnywhere/Webroot\ SecureAnywhere.app/Contents/MacOS/Installer -keycode=$KEY install -language=en -silent

#Use this command if you are running a proxy.
#sudo /Volumes/Webroot\ SecureAnywhere/Webroot\ SecureAnywhere.app/Contents/MacOS/Installer -keycode=$KEY install -language=en -silent-proxy_auth=auth_basic_1 -proxy_auth=auth_any_0 -proxy_host=$host -proxy_port=$port -proxy_user=$user -proxy_pass=$password

wait 10

#Unmount the DMG.
echo "Unmounting DMG"
diskutil list | grep Webroot\ SecureAnywhere | diskutil unmount /Volumes/Webroot\ SecureAnywhere
echo "Unmounting DMG complete"

wait 30
#Remove the DMG
echo "removing downloading DMG from tmp"
rm -rf /tmp/wsamacsme.dmg
echo "DMG deletion complete"

echo "Script complete on Catalina"

else
echo "Operating System is NOT Catalina, downloading 9.0"
cd /tmp; curl -O http://anywhere.webrootcloudav.com/zerol/wsamacsme.dmg

echo "Please wait while file is downloaded and mounted"
wait 15

#Mount the DMG file
echo "beginning DMG mount"
hdiutil attach -nobrowse /tmp/wsamacsme.dmg
echo "Mounted DMG"


#copy app from dmg to applications. On <Catalina, we copy the .app from the DMG to /Applications and then run the Install command. It's different from the Catalina implementation above
echo "Beginning application copy"
sudo cp -R /Volumes/Webroot\ SecureAnywhere/Webroot\ SecureAnywhere.app /Applications/
wait 10
echo "Copy and wait complete"

#Install the application silently
echo "Begnning application installation"
#Install when you don't have a proxy in place.
sudo "/Applications/Webroot SecureAnywhere.app/Contents/MacOS/Webroot SecureAnywhere" install -keycode=$KEY -language=en -silent

#If running a proxy unhash this command
#sudo "/Applications/Webroot SecureAnywhere.app/Contents/MacOS/Webroot SecureAnywhere" install -keycode=$KEY -language=en –silent -proxy_auth=auth_basic_1 -proxy_auth=auth_any_0 -proxy_host=$host -proxy_port=$port -proxy_user=$user -proxy_pass=$password
echo "app Installation complete"

#Unmount the DMG.
echo "unmounting DMG"
diskutil list | grep Webroot\ SecureAnywhere | diskutil unmount /Volumes/Webroot\ SecureAnywhere
echo "Unmounting DMG complete"

wait 30
#Remove the DMG
echo "removing downloading DMG from tmp"
rm -rf /tmp/wsamacsme.dmg
echo "DMG deletion complete"

echo "Script complete on <Catalina"
fi


echo "Script complete overall"

 


This topic has been closed for comments