This worklet will check to see if Box is installed and if it isn’t, will download and install it.
See this KB article for how to setup a worklet:
https://help.automox.com/hc/en-us/articles/5603324231700-Creating-a-Worklet
Evaluation Code:
#!/bin/bash
if -d "/Applications/Box Sync.app" ]; then
exit 0
else
exit 1
fi
Remediation Code:
#!/bin/bash
echo -e "Downloading Box Sync..."
curl -L -o "/tmp/Box Sync Installer.dmg" https://e3.boxcdn.net/box-installers/sync/Sync+4+External/Box%20Sync%20Installer.dmg
echo -e "Installing Box Sync..."
hdiutil attach "/tmp/Box Sync Installer.dmg" -nobrowse
ditto "/Volumes/Box Sync Installer/Box Sync.app" "/Applications/Box Sync.app"
echo -e "Cleaning up..."
hdiutil detach "/Volumes/Box Sync Installer"
rm -f "/tmp/Box Sync Installer.dmg"