Process.Start

  • Thread starter Thread starter John
  • Start date Start date
J

John

I guess the following code runs but never creates the info file. Can anyone
help me?
Thanks.

Process proc = new Process();
proc.StartInfo.FileName = "IPConfig.exe";
proc.StartInfo.Arguments = "> ip_config_info.txt";
proc.Start();
 
It could be to use cmd.exe as the filename argument, and "/c ipconfig.exe >
ip_config_info.txt" as the arguments property, or, to catch the output via
the StandardOutput property. But John should say which he used.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top