Sophos, in their infinite wisdom, is now distributing their installer for Sophos Cloud as an .app and not a .pkg. Installing, then updating, then capturing with Composer results in about a 250MB .pkg file and it's not as stable or clean as just running this 3.5MB installer on every machine. So it's easy enough to distribute this Sophos Installer.app to every machine's /Users/Shared folder (which I've done), but now I'm having issues getting the software to launch properly without error. I thought it would be as simple as this:
jamf displayMessage -message "In a few seconds you will be prompted to install the new Sophos AntiVirus software onto your computer. You will be asked once per day to install this software until you've done so. It does not require a restart. Please run the installer that launches." && open -a /Users/Shared/Sophos Installer.app
When I put this in the Policy --> Files & Processes --> Execute command, I get the jamfhelper to pop up the message, but then I get the following error when the open command goes to launch the software:
Result of command: LSOpenURLsWithRole() failed for the application /Users/Shared/Sophos Installer.app with error -10810.
On a test machine, if I open Terminal and then type "open -a /Users/Shared/Sophos Installer.app", it launches without issue. So, what is it about putting this command in the policy that's causing it to fail?
Can you think of a better way to launch this installer on every machine to prompt the end-user to install the software?

