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

Line ending issue with Mercurial or Visual Studio -

python - Received unregistered task using Celery with Django -

c# - Delving into the world of XML (Windows Phone) Error I dont understand (The ' ' character, hexadecimal value 0x20, cannot be included in a name.) -