Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void richTextBox1_TextChanged(object sender, EventArgs e)
- {
- Process process = new Process();
- process.StartInfo.FileName = "cmd.exe";
- process.StartInfo.CreateNoWindow = true;
- process.StartInfo.RedirectStandardInput = true;
- process.StartInfo.RedirectStandardOutput = true;
- process.StartInfo.UseShellExecute = false;
- process.Start();
- process.StandardInput.WriteLine("ipconfig");
- process.StandardInput.Flush();
- process.StandardInput.Close();
- process.WaitForExit();
- string s = process.StandardOutput.ReadToEnd();
- richTextBox1.Text = s;
- }
Add Comment
Please, Sign In to add comment