Name          TShutdown
Description   TShutdown either logs off, shuts down, or shuts down and
              restarts the system (win95/NT).
Version       0.91
Release Date  05/01/97
Author        Dennis Spreen (dennis@spreendigital.de)
Code          32-Bit Delphi 2+
DSPDate       06/16/99 ;) After a long field test, the component is now
              released to the DSP public ;)


How to install the component
============================
Select Component|Install from the menu. Click Add, then Browse, then
select ShutDown.PAS in the open file dialog. Click OK to return to the
install component dialog and click OK again to install the component.
ShutDown now appears in the 'System' tab of the component palette.


How to use TShutdown
====================
Take a look at sample.dpr



TShutdown Methods
=================
Execute         Initiates the shutdown process


TShutdown Properties
====================
AllowAbort      [Win95 only]
                if  (TimeOut<>0) and
                    (Messagestring<>'') and
                    (AllowAbort=TRUE) then
                the MessageBox contains an "Abort"-button to give
                the user the ability to abort the system shutdown.


MessageString   if TimeOut<>0 then
                [WinNT]
                Specifies the "notify" string in the shutdown
                message box.
                [Win95]
                Specifies the complete message in the shutdown
                message box.


Name            ComponentName (usually Shutdown1)

NTMAchineName   [WinNT only]
                is used to specify the computer to shutdown.
                if (NTMachineName='') then the local computer
                is being shut down.

OperatingSystem shWinNT - Windows NT
                shWin95 - Windows 95

Options
 shoForce       Forces processes to terminate. Instead of bringing up
                the "application not responding" dialog box for the user, this
                value forces an application to terminate if it does not
                respond.

 shoLogoff      Shuts down all processes running in the security context of the
                process that called the ShutDown.Execute function. Then it logs
                the user off.

 shoPoweroff    Shuts down the system and turns off the power. The application
                must have the SHUTDOWN privilege (WinNT) and the system must
                support the power-off feature.

 shoReboot      Shuts down the system and then restarts the system.

 shoShutdown    Shuts down the system to a point at which it is safe to
                turn off the power. All file buffers have been flushed to
                disk, and all running processes have stopped.

Tag             useless, as always ;)

TimeOut         if (TimeOut<>0) and
                   (MessageString<>'') then
                specifies the time (in seconds!) before
                it shuts down (showing the Message specfied in MeesageString)




Have fun!
 Dennis


-----------------------------------------
      dennis@spreendigital.de
-----------------------------------------


Known Bugs/Problems
===================
- running under the delphi IDE the program will only
  shut the delphi IDE [Win95]


Things still to do
==================
- remote computers wont shutdown (NT)
- result:=false if shudown fails


Thanks to
=========

 Ulrich Gronau      for giving me the hint of the wrong documented
                    privilege name...

 Johann Joubert     for trying to answer my question as fast as
                    possible (even if it didnt helped me very much :)

 Jan Strube         for giving me his new XAdjustTokenPrivileges function
                    (indeed, the only error in my program was the
                     wrong documented privilige name)


History
=======
05/01/97    component icon changed
04/29/97    added Windows 95 Message Box (like WinNT)
04/28/97    added Windows NT functions
