Skip to main content
Inspiring
January 12, 2015
Question

Running external executable in Photoshop CC 2014

  • January 12, 2015
  • 3 replies
  • 2428 views

I am trying to link my panel buttons to external exe files, but I am having problems. I have tried two main approaches, opening the exe directly and then also running an external javascript file that then opens the exe.

var oShell = WScript.CreateObject("WScript.Shell");

var oExec = oShell.Run('D:/PhotoshopExporter.exe');

But the debugger is telling me Uncaught ReferenceError: Wscript is not defined. I tried another method but it gave the same complaint, except regarding ActiveX

This topic has been closed for replies.

3 replies

Alphavader
Participating Frequently
January 14, 2015

With app.system you can open anything!

Here a example:


app.system("cmd.exe /c\"C:/Program Files/Adobe/Adobe Illustrator CC 2014/Support Files/Contents/Windows/Illustrator.exe\" );
Inspiring
January 14, 2015

I get an "app is not defined" error when I tried your method, so I guess you need more code than just what you supplied in your example.

In any case this works fine and I don't see a reason to do it another way.

var exec = require('child_process').exec;

exec('C:/Windows/notepad.exe');

Inspiring
January 12, 2015

Try this:

var f = File('D:/PhotoshopExporter.exe');

f.execute();

c.pfaffenbichler
Community Expert
January 12, 2015

"panel buttons" – are you sure you should not be posting on the EB3 Forum?

Extension Builder 3

Inspiring
January 12, 2015

Yeah maybe. But I got it working anyway using 'child_process'. So typical to find the solution right after posting a question!