I think you answered your own question... For it to work Protected View has to be turned off.
One thing you can try is to place the openDoc command in a trusted function in a folder-level script. Maybe if you do it like that then it will open without having to disable Protected View.
I tried placing openDoc in a trusted function in a folder-level script, but it still gives me the same error message (and references the app.openDoc() function call in the folder-level .js file).
try67, can you offer up any other possible solutions without having to disable Protected View?
Another useful bit of info:
When I open the PDF with the button from a thumb drive inserted into the client machine, the script runs fine. It appears it does not consider the network location to be a "safe path" and thus throws the exception (as described in the safe path discussion in the API reference). As before, I tried running the script from the file on the network (after adding the both the network folder and the files as Privileged Locations) and it still doesn't work.
Any ideas on how to make the network location a "safe path", or create a safe path on the network server?
I think you have to mount it to a drive.
In Preferences : Enhanced Security : there is an "Add Host" button.
Did you try this?