c# - How send a command to command prompt from a console application -
this question has answer here:
- passing argument cmd.exe 5 answers
i have console application project. in application need start command prompt , pass argument command prompt.
i have tried
system.diagnostics.process.start("cmd", "shutdown -s");
but nothing starts command prompt
what want start command prompt , pass argument command prompt
"shutdown -s"
how do that?.
you want launch process directly:
process.start("shutdown", "-s");
Comments
Post a Comment