• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

Windows PowerShell and NativeProcess

Engaged ,
Jan 19, 2017 Jan 19, 2017

Copy link to clipboard

Copied

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

TOPICS
Performance issues

Views

339

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines