Search code examples
c#system-shutdown

Force System.Diagnostics.Process.Start("shutdown", /s /t 0")


System.Diagnostics.Process.Start("shutdown", /s /t 0");

Is it possible to add "/f" before "/s"? Similarly to how you would add "-f" to "shutdown -t 0 -r".

In other words, how can I force a shutdown.


Solution

  • It works.

    Open programs or anything you are working on that preempts saving before closing (like Notepad,Word, Visual Studio...etc ).....and they are all closed off without your intervention, it forces it!