运行 AIR 工作目录中的可执行文件

Run executable in the working directory in AIR

我想在我的应用程序中包含一个命令。是否可以在 AIR 的工作目录中 运行 一个可执行文件?

这个有效:

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);