|
| KiXtart Command Reference |
SHUTDOWNactionAllows you to shut down or reboot a computer. syntaxSHUTDOWN ("computer", "message", wait, force, reboot) parametersComputer The name of the computer you want to shut down or reboot. An empty string("") indicates the local computer. Message String that specifies a message to display in the Shutdown dialog box. Wait Optional parameter specifying the time in seconds that the dialog box is displayed. While the dialog box is displayed, system shutdown can be stopped by using the Win32 AbortSystemShutdown function. If wait is not zero, SHUTDOWN displays a dialog box on the specified computer. The dialog box, which displays the name of the user who called the function and the message specified by message, prompts the user to log off. The system beeps when the dialog box is created. The dialog box remains on top of other windows and can be moved but not closed. A timer counts down the time remaining before a forced shutdown. If the user logs off, the system shuts down immediately. Otherwise, the computer is shut down when the timer expires. If wait is zero, the computer shuts down without displaying the dialog box, and the shutdown cannot be stopped by AbortSystemShutdown. Force Specifies whether applications with unsaved changes are forcibly closed. If force is not zero, applications are closed. If force is zero, a dialog box is displayed prompting the user to close the applications. Reboot Optional parameter specifying whether the computer is to restart immediately after shutting down. If reboot is 1, the computer restarts. If reboot is 0, the computer does not start. returns
remarksSHUTDOWN does not work reliably on Windows 9x due to an issue in the underlying Windows API. As a workaround, try the following command : SHELL %windir%\RUNDLL32.EXE user.exe,ExitWindows example$RC = Shutdown("", "System is being rebooted to enable new settings.", 60, 0, 1) |