Command Prompt

  • Thread starter Thread starter Hareth
  • Start date Start date
H

Hareth

How do I do a "shutdown -i" from the command prompt.

ive tried this method but it doesnt work

System.Diagnostics.Process proc = new System.Diagnostics.Process();
proc.EnableRaisingEvents = false;
proc.StartInfo.FileName = "explorer";
proc.StartInfo.Arguments = "shutdown""-i";
proc.Start();
proc.WaitForExit();
 
It should be

proc.StartInfo.FileName = "shutdown.exe";
proc.StartInfo.Arguments = "-i";

-vJ
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top