wallstreetpolaris.blogg.se

Set an app as default for mac
Set an app as default for mac











set an app as default for mac

Template_Plist="/Library/Scripts/Outlook2016/.plist"Įmpty_Plist="/Library/Scripts/Outlook2016/.plist" Library/Scripts/Outlook2016/Outlook_Default.sh #!/bin/bash I have been calling it at the end of my Outlook 2016 auto config script. Technically also you could have a more complex partial file if you wanted other handlers in there. It has really only been tested on 10.11 as that is our deployment environment, however as long as its using the launchservices subfolder it should probably work. It seems to work but well make sure you test it well first.Ĭonsists of three files in /Library/Scripts/Outlook2016/Īn empty launchservices - for when it hasn't been createdĪ partial launchservices with the outlook mailto entryĪ script that takes the closing tags off the end of the launchservices and appends the partial launchservices to the end. I have a rather hacked scripted solution. usr/libexec/plistbuddy -c "add:LSHandlers:5:LSHandlerRoleAll string " /Users/$username/Library/Preferences//.plist usr/libexec/plistbuddy -c "add:LSHandlers:5:LSHandlerContentType string " /Users/$username/Library/Preferences//. usr/libexec/plistbuddy -c "add:LSHandlers:4:LSHandlerRoleAll string " /Users/$username/Library/Preferences//.plist

set an app as default for mac

usr/libexec/plistbuddy -c "add:LSHandlers:4:LSHandlerContentType string " /Users/$username/Library/Preferences//.plist usr/libexec/plistbuddy -c "add:LSHandlers:3:LSHandlerRoleAll string " /Users/$username/Library/Preferences//.plist usr/libexec/plistbuddy -c "add:LSHandlers:3:LSHandlerContentType string public.vcard" /Users/$username/Library/Preferences//.plist usr/libexec/plistbuddy -c "add:LSHandlers:2:LSHandlerRoleAll string " /Users/$username/Library/Preferences//.plist usr/libexec/plistbuddy -c "add:LSHandlers:2:LSHandlerContentType string -message" /Users/$username/Library/Preferences//. usr/libexec/plistbuddy -c "add:LSHandlers:1:LSHandlerRoleAll string " /Users/$username/Library/Preferences//.plist usr/libexec/plistbuddy -c "add:LSHandlers:1:LSHandlerContentType string " /Users/$username/Library/Preferences//.plist usr/libexec/plistbuddy -c "add:LSHandlers:0:LSHandlerRoleAll string " /Users/$username/Library/Preferences//.plist usr/libexec/plistbuddy -c "add:LSHandlers:0:LSHandlerURLScheme string mailto" /Users/$username/Library/Preferences//.plist usr/libexec/plistbuddy -c "add:LSHandlers array" /Users/$username/Library/Preferences//.plist Not tested and copied from a source I can't remember were or from who, sorry.













Set an app as default for mac