5

I'm looking for a way on Windows 7 (without using third party software) to set a custom execution command on Ctrl + Alt + Del and - obviously - disable the menu that opens when pressing those 3 keys.

I am not looking for a way to open the Task Manager directly, and I want to keep the regular functions of the 3 individual keys the same as well.

Martin Braun
  • 681
  • 2
  • 10
  • 22
  • 3
    The operating system reserves this key combination for itself. It is unlikely that you will be able to change how these keys interact with the OS. – Michael Frank May 14 '14 at 21:11
  • So do you want to run something when you hit C+A+D, or just prevent the menu that shows up? In general though, no you can't reassign those keys, as they are the [system attention keys](http://en.wikipedia.org/wiki/Control-Alt-Delete#Windows_NT_family). Perhaps see [this SU question](http://superuser.com/questions/223348/prevent-programs-from-locking-ctrl-alt-del?rq=1). Having said all that, what exactly have you tried already? – Ƭᴇcʜιᴇ007 May 14 '14 at 21:14
  • 1
    To clarify I want to run a custom command. Disabling the whole blue menu would be the logical conclusion from my attempt on success. I know this will might require some changes in the core. (To the downvoter: I don't know why I get a down vote for that, it's a legitimate question.) – Martin Braun May 14 '14 at 21:18
  • http://stackoverflow.com/questions/1346689/how-do-i-trap-windows-key-alttab-ctrlaltdelete-in-c for some background info. (so yes, it's totally possible but you'd need to rewrite a SYSTEM DLL) – Gizmo May 14 '14 at 21:20
  • 2
    Maybe if you tell us WHY you want this behavior, we can help come up with a workaround. – Wutnaut May 14 '14 at 21:27
  • @Wutnaut I got work-arounds finally, now only my interests are left how to do it the right way without a work-around. Look my comment on DaanCelie's answer, just the blue screen is annoying. – Martin Braun May 14 '14 at 21:48
  • You can customize what appears in that menu (as in, remove features you don't like) using group policy. But the appearance of the security screen cannot be removed without installing your own GINA.DLL (you'll have to program) - replacing taskmgr.exe is surely less dirty than replacing GINA.DLL, though :) – mihi May 14 '14 at 21:51
  • Yea I know about removing options from the blue screen. So I only need to recode GINA.DLL to execute a command instantly and suppressing the blue menu? – Martin Braun May 14 '14 at 21:54
  • 3
    I'm guessing the downvote is because you're trying to do something that's explicitly in violation of something intended to be guaranteed by the OS. Thus (1) you're attempting to create a security risk, (2) there is no "right way" to do it, and (3) as pointed out by Astara, any workaround is likely to be broken by MS in the future. Why *do* you want to do this? – Kyle Strand May 14 '14 at 23:27
  • @Kyle Strand I like to modify my windows for my personal purposes, maybe? But I agree and understand why changing this would be a security issue. I ended up by replacing taskmgr.exe with my own application and accept the "blue intermediate step". – Martin Braun May 15 '14 at 00:43
  • 2
    That's a drastic enough modification that you should really just use a different operating system, I think. Why wouldn't you just use a different keyboard shortcut for whatever it is that you want to happen? – Kyle Strand May 15 '14 at 01:08

1 Answers1

17

You would have to write a driver that goes into the OS, to change it's behavior, and it would be unsupported. C-A-D is the "secure attention" key -- that MS says, "guarantees" you are talking to the real password/login screen, since anything else can be intercepted or faked. The implication is that C-A-D cannot be intercepted or faked through any supported mechanism.

I'd bet it is also the case, that if you came up with something that allowed intercepting CAD, MS, would likely regard it as a security flaw and issue a patch to prevent your method from working.

Astara
  • 649
  • 4
  • 9
  • I think I fully agree to your answer. In future I might overview GINA.DLL and see what abilities the resources give me. – Martin Braun May 15 '14 at 00:47
  • 2
    @modiX: You may be interested in Keith Brown's 2005 article for MSDN Magazine, [Customizing GINA](http://msdn.microsoft.com/en-us/magazine/cc163803.aspx) and/or the 2001 TechNet article [The Essentials of Replacing the Microsoft Graphical Identification and Authentication Dynamic Link Library](http://technet.microsoft.com/en-us/library/bb742447.aspx). – eggyal May 15 '14 at 06:07
  • @eggyal Thank you, yea GINAHOOK is what I need. I'm going to install the Windows 7 Platform SDK and check out the given GINAHOOK and GINASTUB examples. – Martin Braun May 15 '14 at 06:31
  • 1
    @modiX [GINA](http://en.wikipedia.org/wiki/Graphical_identification_and_authentication) DLLs are ignored in Windows Vista and later. [Source](http://msdn.microsoft.com/en-us/library/windows/desktop/aa378750%28v=vs.85%29.aspx) – and31415 May 15 '14 at 14:06
  • A good example of this kind of integration is [Pharos SignUp](http://www.pharos.com/signUp/pharos-signup-LIB.html) for libraries. It completely replaced the login screen and Ctrl-Alt-Delete for Windows 2000 and Windows XP. I haven't seen it for newer versions of Windows though. – Moshe Katz May 20 '14 at 02:32