11 Replies Latest reply on Mar 28, 2017 2:13 AM by jackr6320664

    NativeProcess fails if args contain spaces

    mraak Level 1
      Following code works just fine, and outputs 'blah' to stdout. 
      However, if I put this arg

      args.push("blah blah");

      It fails totaly. What I get on the stdout is corrupt 
      path to helloworld.bat, although it has nothing to do with 
      specifying that path.

      var args:Vector.<String> = new Vector.<String>;

      if (Capabilities.os.toLowerCase().indexOf("win") > -1)
        fPath = "C:\\Windows\\System32\\cmd.exe";
      file = new File(fPath);
      var nativeProcessStartupInfo:NativeProcessStartupInfo = new NativeProcessStartupInfo();
      nativeProcessStartupInfo.executable = file;                     
      nativeProcessStartupInfo.arguments = args;
      process = new NativeProcess();