User Tools

Site Tools

blog:2023-09-10_c_shut_down_the_computer_from_c



2023-09-10 C#: Shut Down the Computer from C#

  • The code that shut down the computer from a C# program
  • using System.Diagnostics;
    
    var psi = new ProcessStartInfo("shutdown","/s /t 0");
    psi.CreateNoWindow = true;
    psi.UseShellExecute = false;
    Process.Start(psi);

TAGS

  • 50 person(s) visited this page until now.

Permalink blog/2023-09-10_c_shut_down_the_computer_from_c.txt · Last modified: 2023/09/10 15:56 by jethro

oeffentlich