Hi
I have a Flex AIR2 application which uses native process to run CMD.exe. Application running fine on WinXP, Win R 2008 server. But not running on VISTA 64 bit OS.
Flex not able to run CMD.exe when application installed in C:\Program Files (x86). When I run application as Administrator mode it is working fine. Below is my code, I want to start cmd.exe as Administrator. My code :
var np:NativeProcess = new NativeProcess();
np.addEventListener(NativeProcessExitEvent.EXIT, done);
np.addEventListener(ProgressEvent.STANDARD_OUTPUT_DATA, onOutput);
np.addEventListener(ProgressEvent.STANDARD_INPUT_PROGRESS, inputProgressListener);
np.addEventListener(Event.STANDARD_ERROR_CLOSE, error);
var info:NativeProcessStartupInfo = new NativeProcessStartupInfo();
var desktopPath :File = File.desktopDirectory;
var strdesktopPath :String = desktopPath.nativePath;
var pathArray :Array = strdesktopPath.split('\\');
var rootDrive :String = pathArray[0];
//Geting Command prompt location
file.nativePath = rootDrive + "\\Windows\\system32\\cmd.exe";
info.executable = file;
var processArgs:Vector.<String> = new Vector.<String>();
info.arguments = processArgs;
np.start(info);