These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

How to exec system command or programs from Javascript

Ollie
Registered: Apr 21 2008
Posts: 3
Answered

In Button Properties, there is a way to add an action that will Open a file with the OS path and execute a window program. How do I do that by using Javascript? I have a project to run a firm customized VB program from Adobe acrobat by hitting a toolbar button. The missing link for this task is how to launch the external program from Adobe Javascript. Any help is greatly appreciated...

My Product Information:
Acrobat Pro 7.0.5, Windows
Lindy
Registered: Jul 17 2007
Posts: 30
You can use a .BAT file to launch other apps.
You can fire the BAT file with app.launchURL.

app.launchURL("file:///c/temp/ping.bat", false);

I'm not sure if you can do this directly from a button.
I call it from a trusted function in a folder level script.

Good Luck
Ollie
Registered: Apr 21 2008
Posts: 3
Thanks Lindy. It works. However, I get "file downloading security wariing" message. Is there any get around to minimize this prompt? Please advise ...
Lindy
Registered: Jul 17 2007
Posts: 30
Ollie:
I don't know of a way to eliminate the prompt. It was not critical to remove it for my application. I would be interested as well, if anyone knows how to suppress this.

Glad to Help
Lindy