I want to know which is the best practice when a piece of software needs to restart, shutdown, logoff or hibernate Windows:
What is the advantages and disadvantages of each approach?
Thanks
I always prefer calling the API (ExitWindowsEx
, InitiateSystemShutdown
).
Pro API
Pro external tool