I want to include a command with my application. Is it possible to run an executable in the working directory in AIR?

1 Answers

0
1.21 gigawatts On Best Solutions

This works:

var process = new NativeProcess();
var processInfo:NativeProcessStartupInfo = new NativeProcessStartupInfo();
var path:String = File.applicationDirectory.nativePath;
var executable:File = new File(path + "/mycommand/mycommand");
processInfo.workingDirectory = File.applicationDirectory;
processInfo.arguments = ["-version"];
processInfo.executable = executable;
process.start(processInfo);