Skip to main content
Inspiring
January 19, 2017
質問

Windows PowerShell and NativeProcess

  • January 19, 2017
  • 返信数 0.
  • 392 ビュー

hello,

Windows PowerShell and NativeProcess work on Windows 10 but not on Windows 7

var nativeProcess:NativeProcess = new NativeProcess();

var nativeProcessStartupInfo:NativeProcessStartupInfo = new NativeProcessStartupInfo();

var file:File = new File("C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe");

nativeProcessStartupInfo.executable = file;

//nativeProcess.addEventListener(IOErrorEvent.STANDARD_INPUT_IO_ERROR, onIOError);

nativeProcess.start(nativeProcessStartupInfo);

nativeProcess.standardInput.writeUTFBytes('[System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")' + "\n");

nativeProcess.standardInput.writeUTFBytes('[System.Windows.Forms.MessageBox]::Show("We are proceeding with next step.")' + "\n");

on Windows 7

nativeProcess.standardInput.writeUTFBytes();

not work but

nativeProcess.addEventListener(IOErrorEvent.STANDARD_INPUT_IO_ERROR, onIOError);

not dispatch event

Thanks

このトピックへの返信は締め切られました。