Reboot – System Function





Reboot Function


Usage

The Reboot function reboots the PC or restarts Windows.

Syntax

Reboot(<code>)

or

ret = Reboot(<code>)

Parameters

  • <code>, numeric according to:
    • 0: Restarts Windows
    • 2: Restarts Windows and the PC (warm boot)
    • 4: Puts the PC in suspend mode (only NT and 2000)
    • 8: Stops the PC

If an application cannot be closed, the system is not rebooted (for instance, when a document has not been saved and a dialog box appears).

Return Value

ret, numeric return code. When the reboot is successful, the function returns 0; otherwise, use this return code for error management.

Example

Reboot(0)