LaunchAgent Applescript

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on 01-06-2017 01:46 PM
Can't find what I'm looking for through searching.. so I am going to post up here.
I am trying to get the defaultbrowser program working, and it is but I get that silly prompt each time asking me if I want to keep Firefox or use Chrome. I made an Applescript that presses the "Use Chrome" button in the dialog box but then Accessibility shows up when I run it the first time and I have to confirm it in System Prefs. Is there any way around this? Currently I am running the Applescript as a LaunchAgent.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on 01-06-2017 03:43 PM
Figured it out.
- Need tccutil.py installed to insert the compiled Applescript into Security & Privacy -> Accessibility
- Need to install defaultbrowser
- Create LaunchAgent that calls the Applescript
- Profit
tccutil.py was the missing link. I see the window at login asking me if I want to change the browser to chrome for a split second.. and then the rest of the Applescript takes care of that. Now to create a package/policy.
