Ejemplo n.º 1
0
        public void RunApp(string cmdLine, string currentDir = null, bool wait = false, [ByRef] IVariable retCode = null)
        {
            var sInfo = ProcessContext.PrepareProcessStartupInfo(cmdLine, currentDir);

            var p = new System.Diagnostics.Process();

            p.StartInfo = sInfo;
            p.Start();

            if (wait)
            {
                p.WaitForExit();
                if (retCode != null)
                {
                    retCode.Value = ValueFactory.Create(p.ExitCode);
                }
            }
        }
Ejemplo n.º 2
0
 public ProcessContext CreateProcess(string cmdLine, string currentDir = null, bool redirectOutput = false, bool redirectInput = false, IValue encoding = null, MapImpl env = null)
 {
     return(ProcessContext.Create(cmdLine, currentDir, redirectOutput, redirectInput, encoding, env));
 }