#43616 - 2003-08-01 02:17 PM
Re: Shutdown commando (u kunt nu de computer uitzetten) w2k
|
MightyR1
MM club member
   
Registered: 1999-09-09
Posts: 1264
Loc: The Netherlands
|
Teddy,
welkom op het BB. Wil je je vraag svp in het engels plaatsen, Dan kunnen meerder mensen je proberen te helpen...
(continuing in English)
A few questions:
** Why this structure of jumping forward, doing something, returning and jumping forward again??? ** What KiX version are you using??? ** What client OS???
Back to topic; From the manual:
quote:
SHUTDOWN
Action Shuts down or reboots a computer.
Syntax SHUTDOWN ("computer", "message", wait, force, options)
Parameters
Computer The name of the computer that is to be shut down or rebooted. 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.
Options Optional parameter specifying one of the following options.
Value Action 1 Reboot computer after shutdown. 2 Poweroff the system after shutdown (NB: this option only works for the local system).
Returns
0 Computer shut down System error code Function failed
Remarks SHUTDOWN does not work reliably on Windows 9x due to an issue in the underlying Windows API. As a workaround, the following command can be used: SHELL "%windir%\RUNDLL32.EXE user.exe,ExitWindows"
Example $RC = Shutdown("", "System is being rebooted to enable new settings.", 60, 0, 1)
Resulting in:
code:
$RC = Shutdown("wks03020", "Het is 11 uur het systeem wordt afgesloten.", 10, 1, 2)
Shutdown/Poweroff will only work for local system!!!
_________________________
Greetz, Patrick Rutten
- We'll either find a way or make one... - Knowledge is power; knowing how to find it is more powerful... - Problems don't exist; they are challenges...
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 952 anonymous users online.
|
|
|