Shuts down or restarts the system based on the specified flags.
The shutdown flags to control the behavior (e.g., Shutdown, Reboot, Hibernate).
1 if successful, 0 otherwise.
import { Shutdown, ShutdownFlag } from '@ahmic/autoit-js';Shutdown(ShutdownFlag.Reboot);// Use bitwise OR to combine flagsShutdown(ShutdownFlag.Shutdown | ShutdownFlag.Force); Copy
import { Shutdown, ShutdownFlag } from '@ahmic/autoit-js';Shutdown(ShutdownFlag.Reboot);// Use bitwise OR to combine flagsShutdown(ShutdownFlag.Shutdown | ShutdownFlag.Force);
https://www.autoitscript.com/autoit3/docs/functions/Shutdown.htm
Shuts down or restarts the system based on the specified flags.