MCX: Set default mail app?

bentoms
Release Candidate Programs Tester

Hi Guys,

I'd like our clients default mail reader to be Outlook 2011.. i tried the com.apple.internet mcx plist but this doesn't seem to work?

Any way of doing this via MCX on 10.7 clients or do i need to script the launch services plist?

3 ACCEPTED SOLUTIONS

talkingmoose
Moderator
Moderator

The com.apple.LaunchServices domain should still be handling default applications for Lion. Just taking a quick glance I see several items you'd want to set for Outlook such as default for .mbox, .ical, .vcard files as well as the default mail application.

Should be able to use MCX for all of these so long as you apply it at the user level. Everything seems to fall under the LSHandlers key.

View solution in original post

bentoms
Release Candidate Programs Tester

Thanks guys.. i'm trying to keep things as much as MCX as possible.. turns out a similar question had been asked before:

https://jamfnation.jamfsoftware.com/discussion.html?id=31

My manage pref looks like:

Display Name: Default applications
Description: Sets preferred applications.
Apply Setting To: User Level At Every Login
Domain: ~/Library/Preferences/com.apple.LaunchServices
Key: LSHandlers
Value:

<array>
    <dict>
        <key>LSHandlerRoleAll</key>
        <string>com.microsoft.outlook</string>
        <key>LSHandlerURLScheme</key>
        <string>mailto</string>
    </dict>
</array>

View solution in original post

bentoms
Release Candidate Programs Tester

Damn you Don & your bucketful of armpit hijacking shenanigans!

View solution in original post

10 REPLIES 10

talkingmoose
Moderator
Moderator

The com.apple.LaunchServices domain should still be handling default applications for Lion. Just taking a quick glance I see several items you'd want to set for Outlook such as default for .mbox, .ical, .vcard files as well as the default mail application.

Should be able to use MCX for all of these so long as you apply it at the user level. Everything seems to fall under the LSHandlers key.

golbiga
Contributor III
Contributor III

You could possibly also use duti for this? http://duti.sourceforge.net/index.php.

bentoms
Release Candidate Programs Tester

Thanks guys.. i'm trying to keep things as much as MCX as possible.. turns out a similar question had been asked before:

https://jamfnation.jamfsoftware.com/discussion.html?id=31

My manage pref looks like:

Display Name: Default applications
Description: Sets preferred applications.
Apply Setting To: User Level At Every Login
Domain: ~/Library/Preferences/com.apple.LaunchServices
Key: LSHandlers
Value:

<array>
    <dict>
        <key>LSHandlerRoleAll</key>
        <string>com.microsoft.outlook</string>
        <key>LSHandlerURLScheme</key>
        <string>mailto</string>
    </dict>
</array>

bentoms
Release Candidate Programs Tester

lol just realised talking moose it was your fix!

thanks!

donmontalvo
Esteemed Contributor III

Hope I'm not hijacking...is there a forum for duti or can I post a question here like:

"How do I use duti to set default application for PDF and ZIP?"

:)

--
https://donmontalvo.com

rockpapergoat
Contributor III

@don, the man page provides some examples. or just run with the -h flag to show an abbreviated version.

donmontalvo
Esteemed Contributor III

@rockpapergoat Thanks! I didn't know there was a man page (must remember to read the README)...I'll check it out, will post results for changing handlers for PDF and ZIP.

UPDATE (er, more of a rewrite)

So we're including duti on our builds now. We're also pushing a PKG containing the *.duti configuration file in /Library/Settings/application-defaults.duti and following with a postflight to run duti on that file (eww...that sounds so dirty!).

/Library/Settings/defaults.duti

# Set application defaults.
#
# Blank lines and lines beginning with a '#' are ignored
#
#   bundle id        UTI        role

com.stuffit.StuffIt-Expander        com.allume.stuffit-archive        all
com.apple.archiveutility        public.zip-archive        all
com.apple.Preview        com.adobe.pdf        all
--
https://donmontalvo.com

bentoms
Release Candidate Programs Tester

Damn you Don & your bucketful of armpit hijacking shenanigans!

iweiss
New Contributor III

Our environment is mostly 10.9. We tried MCX, Config Profiles, Defaults write, Bash scripts, editing the LaunchServices db and Duti, but they were either too complex or not reliable. It was hard for me to believe that there was no easy way to set this. Finally I ran across the AppleScript listed below on the Google MacEnterprise forum. It is simple and appears to work well in testing. At first this script only worked when I ran it from the AppleScript Editor. I had tried pasting it into the JSS, but it appeared to do nothing when run. Then I tried saving as text(.applescript), uploading via Casper Admin and now it seems to work great. Not sure if it needs the quit signal at the end. Hope this helps others.

tell application "Microsoft Outlook"
    set system default everything application to yes
end tell
tell application "Microsoft Outlook" to quit
end

ktappe
New Contributor III

Unfortunately I just tested Ian's script in Sierra and it not only throws a "Can't get end" error, but it also doesn't change Outlook to be the default. So I fear we're again seeking a solution. Thanks if anyone has any ideas or leads.