Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- info.WorkingDirectory = @"C:r_installsR-3.3.2binx64";
- info.FileName = @"C:r_installsR-3.3.2binx64R.exe";
- info.Arguments = $"--vanilla";
- info.RedirectStandardInput = true;
- info.RedirectStandardOutput = true;
- info.RedirectStandardError = true;
- info.UseShellExecute = false;
- info.CreateNoWindow = true;
- info.ErrorDialog = true;
- info.Domain = _Cred.Domain;
- info.UserName = _Cred.UserName;
- info.Password = _Cred.PwdSecure;
- var proc = new Process();
- proc.OutputDataReceived += new DataReceivedEventHandler(ReadAsyncOutput);
- proc.ErrorDataReceived += new DataReceivedEventHandler(ReadAsyncOutput);
- proc.StartInfo = info;
- proc.Start();
- proc.WaitForExit();
- proc.BeginOutputReadLine();
- proc.BeginErrorReadLine();
Add Comment
Please, Sign In to add comment