More stuff ready for anyone who'd like to test...
I've devised a launchd setup that works well for me in my testing to automatically configure Outlook 2016 the first time it's launched. After a lot of research into launchd QueueDirectories and WatchPaths, the WatchPaths made the most sense because I can monitor for the existence of specific files. (Thanks, @eholtam, for your ideas. I adapted them for my own changes.)
The whole setup consists of one LaunchAgent file and two scripts. The only file you need to customize is the AppleScript. Everything else can just drop in place. The ROOT folder simply designates the "root" of the hard drive or "/". For now, be sure to keep the names and paths of the files and folders the same as I've created them unless you're comfortable changing the references in the three files.
I've also made minor changes to the AppleScript itself to better accommodate all potential settings not just Active Directory as well as accommodate this new setup.
You'll find everything here: https://github.com/talkingmoose/Outlook-Exchange-Setup-5.0
Click the Download ZIP button to the bottom right and locate these files in the ROOT folder:
- /Library/LaunchAgents/net.talkingmoose.OutlookExchangeSetupLaunchAgent.plist
- /Library/Talking Moose Industries/Scripts/Outlook Exchange Setup 5.0.scpt (customize this)
- /Library/Talking Moose Industries/Scripts/OutlookExchangeLaunchAgent.sh
Feedback, as always, is greatly appreciated.