E
E
EvgenyKon2017-12-24 16:49:15
Command line
EvgenyKon, 2017-12-24 16:49:15

How to output the result of a CMD query to a file via C#?

You need to output the result of a CMD query to a file via C#.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
SimAllll, 2017-12-24
@SimAllll

Process.Start and catch stdout

P
Profi_GMan, 2017-12-25
@Profi_GMan

execute "command 2>&1> file"
2>&1 is needed so that errors are also written to the file

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question