Dos Command
You have to use the System.Diagnostics.Process class. The following code issues a dir command and retrieves all the output generated by the command prompt in a string variable. You can write its contents to a file if you want: ProcessStartInfo si = new ProcessStartInfo("cmd.exe");//...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.