Document level scripts run when a PDF is opened, as described in my last article. Folder level scripts run every time the PDF application starts. This is essential for creating custom toolbar buttons and custom menu items.
As I continue to rail against the "new experience" in Acrobat and Reader and hope they never to decide to eliminate Hamburger Menu => Disable New Acrobat, I'll add two more reasons to the stack. The "old experience" menu had File, Edit, View, E-Sign, Window, and Help. Since they jammed all but Help somewhere in the hamburger menu, custom menu items created for some of the other menu parents will no longer function (File, for example). The add-on tools (custom toolbar buttons) work, but the icons have been replaced with pink cartoonish bricks.
Since the menu items and toolbar buttons are created with a script, this script must run when the application opens.
Get the course above, and a suite of automation tools for FREE with a Professional subscription.
Privilege
If you’ve spent any time in the Acrobat JavaScript reference guide, you'll discover that many methods and functions are "privileged", meaning they can only function within a specific context, like console events, actions, or trusted functions in folder level scripts.