exec in C#
-
-
How can I execute some command from my C# programm, as though I execute it from cmd.exe? And how can I get the result of it? So, I need execute "net view \\hostname" and get its output into a string variable.. Help, please.. -- Digitally yours, Bounz
Look at the System.Diagnostics.Process class. You can start a process and intercept its output to your own stream. You pass the name of the app into a ProcessStartInfo object just like you would pass the name of the app in the command window.
Tech, life, family, faith: Give me a visit. I'm currently blogging about: The Secular Left, the Religious Right, and Prejudice Judah Himango
-
Look at the System.Diagnostics.Process class. You can start a process and intercept its output to your own stream. You pass the name of the app into a ProcessStartInfo object just like you would pass the name of the app in the command window.
Tech, life, family, faith: Give me a visit. I'm currently blogging about: The Secular Left, the Religious Right, and Prejudice Judah Himango