Skip to content

Instantly share code, notes, and snippets.

@xhruso00
Created February 7, 2014 11:29
Show Gist options
  • Save xhruso00/8861083 to your computer and use it in GitHub Desktop.
Save xhruso00/8861083 to your computer and use it in GitHub Desktop.
Applescript to reset Contacts / AddressBook privacy& security list. Requires administration password.
tell application "System Preferences"
launch
activate
reveal anchor "Privacy_Contacts" of pane id "com.apple.preference.security"
display alert "RESET CONTACTS APPROVAL LIST" message "This script will reset (clear) the list of applications in the Contacts section of the Privacy system preference pane." & linefeed & linefeed & "This action requires an administrative password, and cannot be undone." as critical buttons {"Cancel", "Reset"} cancel button "Cancel"
set show all to true
do shell script "tccutil reset AddressBook" with administrator privileges
delay 1
reveal anchor "Privacy_Contacts" of pane id "com.apple.preference.security"
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment