Run PowerShell script?
import flash.filesystem.*;
import flash.desktop.NativeProcess;
import flash.desktop.NativeProcessStartupInfo;
var file:File = new File("C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe");
var nativeProcessStartupInfo:NativeProcessStartupInfo = new NativeProcessStartupInfo();
nativeProcessStartupInfo.executable = file;
var args:Vector.<String> = new Vector.<String>();
args.push("c:\\test\\sendTest.ps1");
nativeProcessStartupInfo.arguments = args;
var process:NativeProcess = new NativeProcess();
process.start(nativeProcessStartupInfo);
Trying to get Powershell to run sendTest.ps1 in the c:\test folder. I get no error, or anything for that matter.
If I issue this at the command prompt:
powershell c:\test\sendTest.ps1
It works fine. But I just can't get the syntax correct to run it from AIR.
Anyone tell me what I'm doing wrong?
