Calling this function shuts down a Windows NT Server, Workstation or W2K machine. It was tested on a W2K Professional.
The first argument is the name of the machine to reboot. If this is undef then the actual machine running is shutting down.
The second argument is the message that the system will display on the screen before starting the actual shutdown. This argument may also be undef in case there is no need for such a message.
The argument timeout is the number of seconds that the operating system will wait before starting the actual shutdown.
force specifies whether applications with unsaved changes are to be forcibly closed. If this parameter is TRUE, such applications are closed. If this parameter is FALSE, a dialog box is displayed prompting the user to close the applications.
reboot specifies whether the computer is to restart immediately after shutting down. If this parameter is TRUE, the computer is to restart. If this parameter is FALSE, the system flushes all caches to disk, clears the screen, and displays a message indicating that it is safe to power down or switches off automatically.
The function calls the Windows NT InitiateSystemShutdown function. Some sentences of this ScriptBasic documentation was copied from the original documentation of the Windows NT system API documentation.