Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 865
  • Last Modified:

disable ALT + CTRL + DEL

how can i disable ALT + CTRL + DEL programmeticly .
0
jimy7s
Asked:
jimy7s
  • 7
  • 4
  • 3
  • +5
1 Solution
 
CmdrRickHunterCommented:
what platform?  Windows grabs "ctrl+alt+del" without letting any programs touch it.  This is why win2k has you hit ctrl+alt+del to log in... no program is allowed to capture or stop that combo, so the login prompt you have is guarenteed to be real
0
 
Wim ten BrinkSelf-employed developerCommented:
Bad boy! Bad, bad boy! ;-)
With Windows, you are not allowed to disable CTRL+ALT+DEL in Windows, especially not in XP. If you do manage to disable it, it will be a bug that might not be possible with the next patch or upgrade. I'm not saying it is not possible, of course. It's just that you should NOT do such a thing.

I can imagine that you don't want users to log out or turn off the computer. Well, that's why you can use policies on Windows. Let the user log on using a normal account and make sure quite a few options for this user have been turned off. Go to "Settings/Control Panel/Administrative tools/Local Security Policy" and with "Local Policies/User rights Assignments" you just make a few modifications. The policy "Shut down the system" should not include the users, for example. There are some things at "Security options" too that are interesting to modify.

Work with the system, not against it. That's a lot easier...
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
ComboyCommented:
Here it is:
procedure DisableTaskMgr;
var
  reg: TRegistry;
begin
  reg := TRegistry.Create;
  reg.RootKey := HKEY_CURRENT_USER;
  reg.OpenKey('Software', True);
  reg.OpenKey('Microsoft', True);
  reg.OpenKey('Windows', True);
  reg.OpenKey('CurrentVersion', True);
  reg.OpenKey('Policies', True);
  reg.OpenKey('System', True);
  reg.WriteString('DisableTaskMgr', '1');
  reg.CloseKey;
end;
0
 
BlackTigerXCommented:
that specific combination is owned by the OS in Windows 2000, XP and 2003 and "cannot" be disabled, the way to disable it correctly is kinda complicated, you have to replace the GINA.DLL, which is in charge of the logging mechanism to Windows itself, you'll find good information at microsoft.com about this topic

http://search.microsoft.com/search/results.aspx?st=b&na=88&View=en-us&qu=gina.dll
0
 
HypoviaxCommented:
Why dont you just hook those keys. You can use code like this:

if ((GetAsyncKeyState($+162) and 1) = 1) then //ctrl key
//do something

if ((GetAsyncKeyState($+164) and 1) = 1) then //alt key
//do something

if ((GetAsyncKeyState($+46) and 1) = 1) then //del key
//do something

OR

If you simple do not want task manager to run then you could close the window by putting this inside a timer:

postmessage(findwindow(nil,pchar('Windows Task Manager')),wm_close,0,0);

NOTE: this method is not perminate, it will only work while you have the program running

Regards,

Hypoviax
0
 
HypoviaxCommented:
Sorry, with the hook example remove those plus signs. I think the second method is better though
0
 
Wim ten BrinkSelf-employed developerCommented:
I don't think that hook method will work or else MS would have a real serious problem. CTRL+ALT+DEL is captured before the messaging system sends it's as key messages.
0
 
HypoviaxCommented:
Hmmmm, it might be so Workshop_Alex. You will have to try it out.

Regards,

Hypoviax
0
 
gandalf_the_whiteCommented:
jimy7s  i think you should tell us why you need it
0
 
HypoviaxCommented:
I agree, if we know what the purpose is then a more detailed answer may be posted!

Regards,

Hypoviax
0
 
jimy7sAuthor Commented:
hi guys . ok if i need to lockup my PC means nobody can access it so the only way to access it by ending the task ( program lock) via Task Manager so if it disabled i can forbid anyone to use my PC .
and thanks alot .
0
 
jimy7sAuthor Commented:
guys if the function works on most windows versions its be good.
0
 
gandalf_the_whiteCommented:
what operating systems do you have on your computer?

because on xp an 2000 it would be enough to lock your pc
so no coding is necessary for reaching your goal
0
 
HypoviaxCommented:
Simply terminating task manager by closing the window would work. See my second suggestion

Regards,

Hypoviax
0
 
jimy7sAuthor Commented:
i wanna disable it silently .OK i mean that when any one pressed alt+ctrl+del it seems it has no effect ( no messages or even flash on the screen ) i hope you got my idea.
and i know the how to lock by using windows but i want to write my own program.
0
 
CmdrRickHunterCommented:
here's the problem with that.  Windows is SPECIFICALLY coded against allowing you to do that.  Other than the gina.dll trick sugested earlier, windows DOES NOT allow you to trap/ignore/use/deny/etc alt-ctrl-del.  This is a security measure, to keep people from writing programs to steal logins.  If you want windows locked, you tell windows to lock itself, or you use the gina dll stuff, write your own lock in there, tell windows to use your lock, then tell windows to lock itself.
0
 
HypoviaxCommented:
If you have a timer at a interval of 1 ms and consistently close that window inside the ontimer event:

postmessage(findwindow(nil,pchar('Windows Task Manager')),wm_close,0,0);

...then it will close that window as soon as it opens - it is unlikely that there will be even a flash.

Regards,

Hypoviax
0
 
gandalf_the_whiteCommented:
@hypoviax: the timer solution will work only in xp, because there the taskmanager is opened directly.

in win2k the whole screen changes, all hooks are deactivated and you have the screen with
the six options (log off, change password, turn off computer, task manager, ...)  (sorry for the translation - german windows)

without changing gina i know only one way. you can set the screensaverunning variable. but this
will deactivate all other windows specific key combinations (like the windows key, alt tab,  ...)

deactivate the keys:  
  systemparametersinfo(spi_screensaverrunning,1,@dummy,0);

activate the keys:
  systemparametersinfo(spi_screensaverrunning,0,@dummy,0);


btw changing gina will result in problems if you want to use updates from microsoft,
as i dont think the installer will run on modified systems (at least i would not allow it)

regards
0
 
HypoviaxCommented:
Actually, gandalf_the_white  my solution will work in Win2k because as soon as the user selects windows taskmanager the window will close immediately. I have tried this and it works. Of course it is not as good as the effect in WinXp but it works just the same. Similarly if the author wants to apply the restrictions on say Change Password (Not present on all computers) then the window title for the change password window could thus be added to the timer - the window will close without the user knowing and they will assume that they cannot change the password. As for the log off and shutdown, these features are present under the start menu anyway and can be restricted more easily in the registry

Best Regards,

Hypoviax
0
 
gandalf_the_whiteCommented:
>> i wanna disable it silently .OK i mean that when any one pressed alt+ctrl+del it seems it has no effect ( no messages or even flash on the screen ) i hope you got my idea.
>> and i know the how to lock by using windows but i want to write my own program.

disable silently won't work in win2k as long as the windows specific keys are allowed
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

  • 7
  • 4
  • 3
  • +5
Tackle projects and never again get stuck behind a technical roadblock.
Join Now