c# - How send a command to command prompt from a console application -


this question has answer here:

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

Popular posts from this blog

java - Run a .jar on Heroku -

java - Jtable duplicate Rows -

validation - How to pass paramaters like unix into windows batch file -