Opening a file in a non-default application with Adobe AIR
8 years ago
On a current project I had to launch files in an application that was not Windows’ default app for opening. Specifically – I needed to open images in Photoshop or Fireworks from my AIR app, even when the default app for .png and .jpg is the Windows Photo Viewer.
As you might already know the File API has had the file.openWithDefaultApplication() method since AIR 2.0. But this wasn’t going to cut it since I needed to open in a specific application. So I turned to the NativeProcess API which allows you to launch a native process from your AIR app (i.e run an .exe on Windows). I decided I should make a post on how to do it since I couldn’t find any good resources or examples for it.