DelphiFAQ Home Search:

Disable Ctrl-Alt-Del and Alt-Tab

 

comments6 comments. Current rating: 5 stars (1 votes). Leave comments and/ or rate it.

Issues:
The program should be nice and small so it can load before a user can hit CTRL-ALT-DEL.

Solution:
Compile a single WIN32API call into a small .exe in delphi.

Note:
This was written for Delphi 2 (thus Unit name WINPROCS) and the code actually only works under Windows 3.x and 95/98.

program small;
{written by rleigh@deakin.edu.au (Richard Leigh, Deakin Univesity 1997}

uses WinProcs;

{$R *.RES}

var
   Dummy : integer;

begin
  Dummy := 0;
  {Disable ALT-TAB}
  SystemParametersInfo( SPI_SETFASTTASKSWITCH, 1, @Dummy, 0);
  {Disable CTRL-ALT-DEL}
  SystemParametersInfo( SPI_SCREENSAVERRUNNING, 1, @Dummy, 0);
end.
You don't like the formatting? Check out SourceCoder then!

Comments:

2006-05-07, 05:55:17
chandrans_paris@yahoo.com from France  
rating
i want to know how to disable CTRL-ATL-DEL
waiting for your reply
kind regards,
chandran
2006-06-20, 18:57:30
ncaparas@yahoo.com from Philippines  
i want to know how to disable CTRL-ATL-DEL in Win2k / WinXP?

i found a shareware component called dWinLock. the component can disable it and other winkey combination even the 'winkey' on the keyboard. the problem is its a shareware

waiting for you kind reply

thanks in advance
norman
2006-06-20, 19:25:51
anonymus from Philippines  
Sorry wrong click....
2007-04-11, 03:49:30
anonymous from Germany  
disable CTRL-ATL-DEL in Win2k / WinXP:


uses
registry;


Procedure TaskManager(Const status:Boolean);
var
Reg: TRegistry;
begin
Reg := TRegistry.Create;
try
Reg.RootKey := HKEY_CURRENT_USER;
if
. OpenKey('\Software\Microsoft\Windows\CurrentVersion\Policiesies\System',True)
then
Reg.WriteInteger('DisableTaskMgr',Integer(Status));
finally
Reg.CloseKey;
Reg.Free;
end;
end;



//Disabled := True;
//Enabled := False;
procedure TForm1.Button1Click(Sender: TObject);
begin
TaskManager(true); //Taskmanager deaktivieren
end;
2008-07-14, 12:48:12
anonymous from Brazil  
this code it's wrong!
2008-09-01, 05:46:40
anonymous from Turkey  
program small;
{written by rleigh@deakin.edu.au (Richard Leigh, Deakin Univesity 1997}

uses WinProcs;

{$R *.RES}

var
Dummy : integer;

begin
Dummy := 0;
{Disable ALT-TAB}
SystemParametersInfo( SPI_SETFASTTASKSWITCH, 1, @Dummy, 0);
{Disable CTRL-ALT-DEL}
SystemParametersInfo( SPI_SCREENSAVERRUNNING, 1, @Dummy, 0);
end.

//This code did not work on vista.

 

 

Email address (not necessary):

Rate as
Hide my email when showing my comment.
Please notify me once a day about new comments on this topic.
Please provide a valid email address if you select this option.
 
It seems that you are
from Los Angeles, US .

Info/ Feedback on this

Show city and country
Show country only
Hide my location
You can mark text as 'quoted' by putting [quote] .. [/quote] around it.
Please type in the code:
photo Add a picture:

Please do not post inappropriate pictures. Inappropriate pictures include pictures of minors and nudity. The owner of this web site reserves the right to delete such material.