AppleScript changing enabled services in the extensions pref pane

I have a script that creates a new quick action for the touch bar based on a template. It all works great, except that the user must alway open system preferences after running the "create new" quick action to enable the newly created service in the extensions pref pane -> touch bar list. I would like to just add something that enables it automatically at the end of the script so it just shows up on the touch bar.


I dug around a bit, I see that it's doable to change preferences like that but I havent been successful in finding the way for how the extensions pane is laid out.


Thanks for the help.


Running 10.15.4

AppleScript changing enabled services in the extensions pref pane
 
 
Q