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
 
Back
Top