3.2 KiB
Documentation
So I had a request to set the default Mail application in macOS from another tech. I did a bit of looking into this and found it was not the easiest thing to do. There are several third-party 'solutions' out there (see some below). While some work quite well (specifically most people use dutil), some only did half of what I was wanting to accomplish. And mostly, I didn't want to have to package these utilities and deploy them, just to perform this task, if I didn't absolutely have too.
This script was inspired by @thoule & @scheb and miketaylr@GitHub. It will allow you to set the default application for both URL Schemes and Content Types (i.e. File Extensions). I wrote this for use in a JAMF environment utilizing JSS Script Parameters, but it isn't required obviously and those entries can be manually set.
Apple Official Documentation on Launch Services
Other 'complied' utilities that perform this task as well
-
[IC-Switch] - doesn't seem to be mentioned on the developers website anymore, but I was able to find a link to download it from the dev's site.
Other random mentionings regarding configuring Launch Services
-
lsregister: How Files Are Handled in Mac OS X via krypted.com
-
Why is a command line change to ~/Library/Preferences/com.apple.LaunchServices.plist not effective immediately? AskDifferent@StackExchange
-
Change file association in terminal? @ AskDifferent@StackExchange
-
How to change default app for all files of particular file type through terminal in OS X? via SuperUser@StackExchange
-
How to set default application for specific file types in Mac OS X? via StackOverflow
-
Change the default application (for a file extension) via script/command line? via AskDifferent@StackExchange