import flash.filesystem.File;
import flash.desktop.NativeProcess;
import flash.desktop.NativeProcessStartupInfo;
var process:NativeProcess = new NativeProcess();
var nativeProcessStartupInfo:NativeProcessStartupInfo = new NativeProcessStartupInfo();
var exe:File = new File();
exe.nativePath = "C:/Program Files/Microsoft Office/Office15/Outlook.exe";
nativeProcessStartupInfo.executable = exe;
var args:Vector.<String> = new Vector.<String>();
args.push('/sniff');
nativeProcessStartupInfo.arguments = args;
process.addEventListener(NativeProcessExitEvent.EXIT, appClosed);
//start the process
process.start(nativeProcessStartupInfo);
function appClosed(e:NativeProcessExitEvent):void
{
process.removeEventListener(NativeProcessExitEvent.EXIT, appClosed);
trace("closed");
}
Here's a little code that will open Outlook on my machine. The args let you send command line switches, like /sniff which forces outlook to update meeting requests and such. You will need to publish to AIR and use the Extended Desktop profile.