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 -

tags - Jquery Mixitup plugin help prevent handlers being destroyed -

python - Received unregistered task using Celery with Django -