@ahmic/autoit-js
    Preparing search index...

    Function ShutdownSync

    • Shuts down or restarts the system based on the specified flags.

      Parameters

      • flags: ShutdownFlag

        The shutdown flags to control the behavior (e.g., Shutdown, Reboot, Hibernate).

      Returns number

      1 if successful, 0 otherwise.

      import { ShutdownSync, ShutdownFlag } from '@ahmic/autoit-js';

      ShutdownSync(ShutdownFlag.Reboot);

      // Use bitwise OR to combine flags
      ShutdownSync(ShutdownFlag.Shutdown | ShutdownFlag.Force);