Board index » delphi » Disable Ctrl+Alt+Del in WinXP?????

Disable Ctrl+Alt+Del in WinXP?????

I don't know if this is the right newsgroup to post this:

  I know how to disable Ctrl+Alt+Del in Win95, Win98. But I the way I
know doesn't work with WinNT 4.0 or Win2k or WinXP!!!! How can I
disable this in WinNT 4.0 or Win2k or WinXP.

  SOURCE CODE IS VERY WELCOME! COMPONENTS (WHOSE SOURCE CODE I CAN'T
SEE) ARE _NOT_ WELCOME!

---
  PS. How can I get the version of the Win OS the user is running (eg.
before NT 4.0 -the normal disabling way-, after NT 4.0 -your
disabling-). Code is welcome here too!!!

Chris Mantoulidis

 

Re:Disable Ctrl+Alt+Del in WinXP?????


Quote
"Chris Mantoulidis" <c...@cylog.org> wrote in message

news:90c29d91.0304202324.1ceeb56d@posting.google.com...

Quote
> I don't know if this is the right newsgroup to post this:

>   I know how to disable Ctrl+Alt+Del in Win95, Win98. But I the way I
> know doesn't work with WinNT 4.0 or Win2k or WinXP!!!! How can I
> disable this in WinNT 4.0 or Win2k or WinXP.

>   SOURCE CODE IS VERY WELCOME! COMPONENTS (WHOSE SOURCE CODE I CAN'T
> SEE) ARE _NOT_ WELCOME!

> ---
>   PS. How can I get the version of the Win OS the user is running (eg.
> before NT 4.0 -the normal disabling way-, after NT 4.0 -your
> disabling-). Code is welcome here too!!!

"User Policies" or rewriting the gina.dll is the only way to accomplish this
on 2k/XP.

Cheers,
Nicholas Sherlock

Re:Disable Ctrl+Alt+Del in WinXP?????


I can't help you with the Ctrl+Alt+Del, but here is some code you might want
to have a look at for the OS version... I wrote it a couple of years ago, so
no WinXP and so on, but look at the record def of TOSVersionInfo and play
around with it a bit to get all the information you need.

interface

uses
  Windows;

type
  TOperatingSystem = (osUnknown, osWindowsNT, osWindows, osWindows31);

function GetOperatingSystem : TOperatingSystem;

implementation

function GetOperatingSystem : TOperatingSystem;
var
  OSVersionInfo : TOSVersionInfo;
begin
  FillChar(OSVersionInfo, SizeOf(OSVersionInfo), 0);
  OSVersionInfo.dwOSVersionInfoSize := SizeOf(OSVersionInfo);

  if GetVersionEx(OSVersionInfo) then
    case OSVersionInfo.dwPlatformId of
      VER_PLATFORM_WIN32s        : Result := osWindows31;
      VER_PLATFORM_WIN32_WINDOWS : Result := osWindows;
      VER_PLATFORM_WIN32_NT      : Result := osWindowsNT;
    else
      Result := osUnknown;
      MessageDlg('Unknown operating system (' +
IntToStr(OSVersionInfo.dwPlatformId) + ')',
                 mtWarning, [mbOK], 0)
    end
  else
  begin
    Result := osUnknown;
    MessageDlg('Could not determine operating system (' +
IntToStr(OSVersionInfo.dwPlatformId) + ')',
               mtWarning, [mbOK], 0)
  end;
end; {GetOperatingSystem}

--
Regards

John Bester
mailto:john.bes...@adept.co.za

Quote
"Chris Mantoulidis" <c...@cylog.org> wrote in message

news:90c29d91.0304202324.1ceeb56d@posting.google.com...
Quote
> I don't know if this is the right newsgroup to post this:

>   I know how to disable Ctrl+Alt+Del in Win95, Win98. But I the way I
> know doesn't work with WinNT 4.0 or Win2k or WinXP!!!! How can I
> disable this in WinNT 4.0 or Win2k or WinXP.

>   SOURCE CODE IS VERY WELCOME! COMPONENTS (WHOSE SOURCE CODE I CAN'T
> SEE) ARE _NOT_ WELCOME!

> ---
>   PS. How can I get the version of the Win OS the user is running (eg.
> before NT 4.0 -the normal disabling way-, after NT 4.0 -your
> disabling-). Code is welcome here too!!!

> Chris Mantoulidis

Re:Disable Ctrl+Alt+Del in WinXP?????


Quote
c...@cylog.org (Chris Mantoulidis) wrote in message <news:90c29d91.0304202324.1ceeb56d@posting.google.com>...
> I don't know if this is the right newsgroup to post this:

>   I know how to disable Ctrl+Alt+Del in Win95, Win98. But I the way I
> know doesn't work with WinNT 4.0 or Win2k or WinXP!!!! How can I
> disable this in WinNT 4.0 or Win2k or WinXP.

>   SOURCE CODE IS VERY WELCOME! COMPONENTS (WHOSE SOURCE CODE I CAN'T
> SEE) ARE _NOT_ WELCOME!

> ---
>   PS. How can I get the version of the Win OS the user is running (eg.
> before NT 4.0 -the normal disabling way-, after NT 4.0 -your
> disabling-). Code is welcome here too!!!

> Chris Mantoulidis

// If win9x
If Win32Platform = VER_PLATFORM_WIN32_WINDOWS then
  Begin
    ....
  End
  Else //winnt/2000/xp
  Begin
    ....
  End;

Can't help with the keyboard stuff -sorry.

John

Re:Disable Ctrl+Alt+Del in WinXP?????


I found this some where - dont know if it works but give it a go:
====================
The following code snippets will show you how to utilise the power of the
Windows API to add special features to your Delphi applications.

Disable task switching
Using the SystemParametersInfo API function you can trick Windows into
thinking that the screen saver is running. Doing so disables the
Ctrl-Alt-Delete key sequence from displaying the "Close Program" dialog and
rebooting the computer and Alt-Tab from switching to another application. It
also stops Ctrl-Esc from opening the Start Menu.
If you wish to disable those keys while your application is running call the
following SystemKeys function (place it in the Implementation section of
your unit's code - and call from any procedure in your application - where
needed). When you call SystemKeys, if Disable is True, the keys will be
disabled, False otherwise.

After a call to SystemKeys(True) the program runs, but you are unable to
Alt-Tab to it nor switch to it in the task list. You can't invoke the Start
button, either.

====================
procedure SystemKeys(Disable: Boolean);
 var OldVal : LongInt;
begin
 SystemParametersInfo
    (SPI_SCREENSAVERRUNNING,
     Word(Disable),
     @OldVal,
     0);
end;

======================
Alex

Quote
"Chris Mantoulidis" <c...@cylog.org> wrote in message

news:90c29d91.0304202324.1ceeb56d@posting.google.com...
Quote
> I don't know if this is the right newsgroup to post this:

>   I know how to disable Ctrl+Alt+Del in Win95, Win98. But I the way I
> know doesn't work with WinNT 4.0 or Win2k or WinXP!!!! How can I
> disable this in WinNT 4.0 or Win2k or WinXP.

>   SOURCE CODE IS VERY WELCOME! COMPONENTS (WHOSE SOURCE CODE I CAN'T
> SEE) ARE _NOT_ WELCOME!

> ---
>   PS. How can I get the version of the Win OS the user is running (eg.
> before NT 4.0 -the normal disabling way-, after NT 4.0 -your
> disabling-). Code is welcome here too!!!

> Chris Mantoulidis

Re:Disable Ctrl+Alt+Del in WinXP?????


On Tue, 22 Apr 2003 20:33:44 +1000, "Ferguson" <ree...@iprimus.com.au>
wrote:

Quote
>I found this some where - dont know if it works but give it a go:

That works for Win9x - NT, 2K and XP are ... different

Re:Disable Ctrl+Alt+Del in WinXP?????


Quote
"J French" <Bounce_It_je...@iss.u-net.com_.bin> wrote in message

news:3ea53543.25986233@news.u-net.com...

Quote
> On Tue, 22 Apr 2003 20:33:44 +1000, "Ferguson" <ree...@iprimus.com.au>
> wrote:

> >I found this some where - dont know if it works but give it a go:

> That works for Win9x - NT, 2K and XP are ... different

The word that you're looking for is better and more secure. That code is
just a {*word*193} hack. Win XP and 2K fix that bug :).

Cheers,
Nicholas Sherlock

Re:Disable Ctrl+Alt+Del in WinXP?????


Quote
c...@cylog.org (Chris Mantoulidis) wrote in message <news:90c29d91.0304202324.1ceeb56d@posting.google.com>...
>   I know how to disable Ctrl+Alt+Del in Win95, Win98. But I the way I
> know doesn't work with WinNT 4.0 or Win2k or WinXP!!!! How can I
> disable this in WinNT 4.0 or Win2k or WinXP.

Chris,

I can't give you source code because I sell a commercial library that
does this.  But I can tell you want to look for:

1. To disable Ctrl-Alt-Del, you need either a keyboard driver, a
replacement GINA.DLL, a GINA patch, a replacement WinLogon, or a
Registry Entry to set Policies.

Try this article:
http://msdn.microsoft.com/msdnmag/issues/02/09/CQA/default.aspx

2. To disable any other key, you can use a LOW-LEVEL HOOK.  (See the
above article.)  Alternatively you can edit the KeyMap in Windows 2000
and XP.
http://www.microsoft.com/hwdev/tech/input/w2kscan-map.asp

Hope this helps.
If not, try out KeyBlock (version 3.0 is due out soon)
http://www.phord.com/keyblock.html

Phil

Other Threads