Hi
This problem just appeared a few days ago in our app and for now I'm assuming it's related to AIR 3.2, which some of our users installed.
We have some code to auto update the app by running a native process that runs the installer:
var updateFile:File = File.applicationStorageDirectory.resolvePath("updates/update.exe");
var info:NativeProcessStartupInfo = new NativeProcessStartupInfo();
info.executable = updateFile;
_process = new NativeProcess();
_process.addEventListener(ProgressEvent.STANDARD_OUTPUT_DATA, onOutputData);
_process.addEventListener(ProgressEvent.STANDARD_ERROR_DATA, onErrorData);
_process.addEventListener(NativeProcessExitEvent.EXIT, onExit);
_process.addEventListener(IOErrorEvent.STANDARD_OUTPUT_IO_ERROR, onIOError);
_process.addEventListener(IOErrorEvent.STANDARD_ERROR_IO_ERROR, onIOError);
_process.start(info); // FAILS ON WINDOWS (XP, and Vista)
It seems to fail to start the process and the app crashes at that point. I need to check for sure that one of the error events aren't called but I don't think they are. Also the fact that it used to work before 3.2 leads be to believe that's the problem.
Does anyone know of a related reported issue?
-rich
To update, my problem might be related to trying to launch an exe from outside the ApplicationDirectory:
http://stackoverflow.com/questions/3914964/air-launching-native-proces s-in-windows-not-working
However, I put the exe into my Application Directory and changed the code to launch it from there, but it still doesn't work on Windows XP. I don't know if it will work on Windows Vista & 7.
A final update, I had to use workingDirectory on NativeProcessStartupInfo:
var info:NativeProcessStartupInfo = new NativeProcessStartupInfo();
info.executable = updateFile;
info.workingDirectory = File.applicationDirectory;
Not sure if this would allow it to run outside of applicationDirectory but this is good enough for me!
North America
Europe, Middle East and Africa
Asia Pacific