The problem is this, I call the script (__FileName) from my application, here’s the code:
private void runToolStripMenuItem_Click(object sender, EventArgs e) { var psi = new ProcessStartInfo { FileName = "ruby.exe", Arguments = __FileName, RedirectStandardOutput = true, RedirectStandardError = true, UseShellExecute = false }; var p = Process.Start(psi); textBox2.Text = p.StandardOutput.ReadToEnd() + p.StandardError.ReadToEnd(); } the script window appears and disappears immediately, even if you write "gets" in the script. What to do? Thank you in advance.
p.WaitForExit(); - andreychapsi.Verb = "runas";- Andreycha