Re: Windows Shutdown in code

From: Jeremy Collins (jd.collins_at_ntlworld-not.com)
Date: 10/31/03


Date: Fri, 31 Oct 2003 14:33:51 +0000

Roy wrote:

> Hi,
> Does anyone have some reliable code for shutting windows (2000) down
> from within a Delphi (6) program?
>
> In the past I've used the freeware abf components but this no longer seems
> to work.

This is almost certainly due to the fact that your program needs the
correct privileges to shut down the system under Windows 2000.
Specifically, you need to call AdjustTokenPrivileges with the
SE_SHUTDOWN_NAME flag.

Seach Google groups for "Delphi ExitWindowsEx 2000" or similar, this
has been answered many times before.

-- 
jc
Remove the -not from email


Relevant Pages

  • Re: Dream Company - still in business?
    ... Roy M Klever wrote: ... > and was not going to do more with the delphi part of their ... > business. ...
    (borland.public.delphi.thirdpartytools.general)
  • Shutting Down Windows
    ... I've a need to shutdown windows 2000 from within my Delphi 6 program. ... Has anyone a reliable routine for doing this? ... Roy. ...
    (alt.comp.lang.borland-delphi)
  • Shutting Down Windows
    ... I've a need to shutdown windows 2000 from within my Delphi 6 program. ... Has anyone a reliable routine for doing this? ... Roy. ...
    (comp.lang.pascal.delphi.misc)