Error #3219: The NativeProcess could not be started. ‘not supported in current profile.’
Error #3219: The NativeProcess could not be started. ‘launch path not accessible.’
You are calling a native process but haven’t specified that your AIR application has support to do so.
In the AIR descriptor file you need to specify an extendedDesktop profile like so:
Note that the extendedDesktop must be ordered first.
When ‘launch path not accessible.’ the file may not be executable source.
Files have read, write and execute permissions that are used by the host operating system. In general and basically, if you were to double click on the file and the file did not have permission to execute then the operating system would attempt to open the file with the default application for that file type (we’ve all seen that). If the file does have the permission to run and if is an executable file (like exe, bat, sh, etc) then it will run with the program designated to handle running files with that file type. Source
Check the permissions on the file. The file should have execute permissions. Usually you can right click on the file and change these options. Use with caution.
When you get the launch path is not accessible error it may be that the file you are executing does not have a required argument so the executable doesn’t find the path to that file and the error bubbles up.
Verify the location of the file (example below) and pass in the correct path to the file making sure the other conditions are met.
The following shows how to launch a script located in the root of the AIR application directory:
var nativeProcessStartupInfo:NativeProcessStartupInfo = new NativeProcessStartupInfo(); var file:File = File.applicationDirectory.resolvePath("/usr/bin/osascript"); // "usr/bin/osascript" // ArgumentError: Error #3214: NativeProcessStartupInfo.executable does not specify a valid executable file. // verify file location: // var scriptFile:File = File.applicationDirectory.resolvePath("closeAllWindows.scpt"); var processArgs:Vector.<String>; nativeProcessStartupInfo.executable = file; nativeProcessStartupInfo.workingDirectory = File.applicationDirectory; processArgs = new Vector.<String>(); processArgs = "myscript.scpt"; nativeProcessStartupInfo.arguments = processArgs; process = new NativeProcess(); process.start(nativeProcessStartupInfo);