Trying to programmatically execute command line utils with switches

  • Thread starter Thread starter Mike W
  • Start date Start date
M

Mike W

I'm trying to programmatically run msinfo32.exe /? with the following line
of code but it is not taking the switch:

System.Diagnostics.Process.Start("c:\program files\common files\Microsoft
Shared\MSInfo\msinfo32.exe /?")

I have a couple other command line tools with switches that I would like to
programmatically execute as well. I'm thinking there is another way to do
this but am coming up short. Any help is greatly appreciated.

Thanks,
-m
 
I believe one of the overloaded start methods has a special argument for the
command line switches like:

Process.Start("c:\program files\common files\Microsoft
Shared\MSInfo\msinfo32.exe", "/?")

Try that
 
that worked.
thanks!
-m

Ray Cassick (Home) said:
I believe one of the overloaded start methods has a special argument for
the command line switches like:

Process.Start("c:\program files\common files\Microsoft
Shared\MSInfo\msinfo32.exe", "/?")

Try that
 
Back
Top