Pre Setup Full Disk Access and Automation on Catalina

We are running a manual codesign .pkg installer and notarizing process and was wondering if anyone know if it was possible to pre setup the privacy entries for the following.

  1. Automation - Add System Events, Finder and Adobe Photoshop*
  2. Full Disk Access / Files and Folder - Gain access to desktop and documents folder (we install a sample file to the documents folder) or full disk access.

This is mostly for Catalina and onwards support.

We are not deploying through the app store.

I would guess “no” because that would defeat the purpose of these privacy restrictions - the user is supposed to give explicit permission.

Is there a way to detect if the user has accidentally clicked deny before trying to open a folder item? At least then we could prompt them on how to fix the problem.

No and no. You can’t do either of what you want to do. The files simply aren’t there. For AppleScript you get a specific error. You shouldn’t script the Finder at all.

Full disk access is only for secured areas like I need access to the Mail directory in the user Library.

You can kinda tell if you have access to a file/folder, if it exists and is readable. You can also check the permissions on the file to see if you should be able to access that file/folder, but when it fails, there’s no sure fire way (that I know of) to tell the customer which macOS security subsystem is blocking access.