Home > Language Reference > System Functions > Reboot

Reboot

The Reboot function reboots the PC or restarts Windows.

Syntax

ret = Reboot(0|2|8)

Parameters

0|2|8, 0 restarts Windows, 2 restarts the PC, 8 shuts down 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, optional integer return value. If the function succeeds, the return value is 0. If the function fails, the return value is a nonzero value (see System Functions Errors Codes).

Example

Reboot(0)