Mac - Default Browser Relevance

(imported topic written by SystemAdmin)

I spent a bit of time working this out so I thought I’d share. It’s relevance to return the default web browser for each user on a Mac.

((strings “LSHandlerRoleAll” of it) of dictionaries whose (data “LSHandlerURLScheme” of it = “http”)

of values of arrays “LSHandlers” of dictionaries of files “com.apple.LaunchServices.plist”

of folders “Preferences” of folders “Library” of it, names of it) of folders of folder “/Users”

You can substitute different strings for “http” to see the URLHandler for that type.

  • Aaron

(imported comment written by NoahSalzman)

Nice!

Is that tied to a specific version… 10.5, 10.6?

(imported comment written by SystemAdmin)

I’m getting results back from 10.4, 10.5, and 10.6 Macs.

User accounts that have not set a default browser seem to have no key for LSHandlerURLScheme: http, but it gets created if you set the default browser from within Safari, Firefox, or Chrome.

  • Aaron