Posted on 02-15-2022 10:12 AM
Does anyone know know if there is a custom config / plist way to set the default mail app to outlook?
I know there is a microsoft support tool whcih can do it, but requires user interaction. ive found some old methods with mcx's which no longer work and some bash scripts using duti.
Iam just trying to see if there is a easier / better way to do it via config profile on monterey ?
Posted on 02-15-2022 11:16 AM
I don't think MailToOutlook 2.0 requires any user interaction.
https://macadmins.software/tools/
Install it once per user per computer at login.
Posted on 02-15-2022 11:19 AM
Use the MailToOutlook 2.0 tool located here:
https://macadmins.software/tools/
It's a package installer, so no user interaction required. However, I forgot now if it only does the change for the logged in user, or globally for all users. Not 100% sure on that last bit.
Posted on 02-16-2022 12:36 AM
With python no longer ubiquitous, has anyone any experience setting other protocols such as http(s) and Edge?
Posted on 02-16-2022 02:16 AM
Posted on 02-16-2022 08:59 AM
The venerable SwiftDefaultApps appears to still work fine on Intel and Monterey (12.2.1). No python required.
05-12-2022 03:56 PM - edited 05-12-2022 04:00 PM
@pete_c Thanks for the recommendation of SwiftDefaultApps
Though I finally found this article: https://aporlebeke.wordpress.com/2020/07/16/configuring-a-macs-default-apps-for-different-file-types... I didn't find many examples of how to use it so I thought I would write this up quickly here.
It's not the most intuitive CLI I've ever used 😗 but it works great & the help is good once you understand there are multiple pages (somewhat like the jamf binary...)
Just calling the binary gets you this:
% swda
Utility to retrieve and manipulate default applications in macOS.
Available commands:
- getHandler Returns the default application registered for the URI Scheme or <subtype> you specify.
- getApps Returns a list of all registered applications.
- getSchemes Returns a list of all known URI schemes, accompanied by their default handler.
- getUTIs Returns a list of all known UTIs, and their default handler.
- setHandler Sets <application> as the default handler for a given <type>/<subtype> combination.
- help Prints this help information
- version Prints the current version of this app
To get help on the "Available commands" that have additional options do this:
% swda getHandler
Usage: swda getHandler <type> [options]
<type>
--URL <subtype> Return the default application for <subtype>
--UTI <subtype> Return the default application for <subtype>
--ftp Returns the default FTP client.
--internet, --browser, --web Returns the default web browser.
--mail, --email, --e-mail Returns the default e-mail client.
--news Returns the default news client.
--rss Returns the default RSS client.
[options]
--all When this flag is added, a list of all applications registered for that content will printed.
--role <role> --role <Viewer|Editor|Shell|All>, specifies the role with which to register the handler. Default is All.
-h, --help Show help information for this command
Missing options:
<type>: --UTI, --URL, --internet, --browser, --web, --mail, --email, --e-mail, --ftp, --rss, --news
The script I ended up using it in:
#!/bin/sh
# the swda binary is the CLI for SwiftDefaultApps
# https://github.com/Lord-Kamina/SwiftDefaultApps/releases
# this binary allows an app (i.e., "handler") to be assigned to any available file extension
/bin/chmod 755 '/usr/local/bin/swda'
/usr/bin/xattr -c '/usr/local/bin/swda'
/usr/sbin/chown 0:0 '/usr/local/bin/swda'
# sets Handler (application) for .ics files (which defaults to Apple Calendar) to Microsoft Outlook
/usr/local/bin/swda setHandler --app '/Applications/Microsoft Outlook.app' --UTI 'com.apple.ical.ics'; /bin/sleep 1
/usr/local/bin/swda setHandler --app '/Applications/Microsoft Outlook.app' --UTI 'com.apple.ical.ics.event'; /bin/sleep 1
/usr/local/bin/swda setHandler --app '/Applications/Microsoft Outlook.app' --UTI 'com.apple.ical.ics.todo'; /bin/sleep 1
# check settings
/usr/local/bin/swda getHandler --UTI 'com.apple.ical.ics'; /bin/sleep 1
/usr/local/bin/swda getHandler --UTI 'com.apple.ical.ics.event'; /bin/sleep 1
/usr/local/bin/swda getHandler --UTI 'com.apple.ical.ics.todo'; /bin/sleep 1