-3

How to disable Ctrl-Alt-Del in Windows 7 when the application loads? I'm looking for an example that disables Ctrl-Alt-Del when the app starts, and enables the combination again once it finishes.

I found an example that disables the combination on Windows XP, however, it doesn't seem to work on Windows 7. Why? Is it not allowed on Windows 7 to disable Ctrl-Alt-Del?

Also, I'd like to know how to run an application as admin on Windows 7?

NIMISHAN
  • 1,265
  • 4
  • 20
  • 29
tommy
  • 27
  • 1
  • 2
  • 3
    You are more likely to get good answers if you phrase your question more carefully, and if you only ask one question at a time. – Will Dean Jun 20 '11 at 08:16
  • 1
    We can't answer 'why samples for WinXp does not working for Win7' because we don't know what samples you are talking about – Anton Semenov Jun 20 '11 at 08:23

3 Answers3

1

I think (and hope actually) windows reserved ctrl alt del for the operating system, so i don't think you can circumvent it.

About the admin thing: How do I force my .NET application to run as administrator?

Community
  • 1
  • 1
hcb
  • 8,147
  • 1
  • 18
  • 17
  • You think correctly, check this: http://www.codeproject.com/KB/winsdk/AntonioWinLock.aspx – Abel Aug 17 '11 at 07:11
1

In order to run an Application as Admin - right click and select Run as administrator.

To change the UAC level that your VB application runs at you need to edit the app.manifest file.

Matt Wilko
  • 26,994
  • 10
  • 93
  • 143
-1

In my opinion this can be done only with global hook. But global hook is not supported by .NET, take a look at this answer. So you can't do this with VB.NET but can with C++.

EDIT: you can do this with VB.NET or any other .NET language, see comments for pointers.

Community
  • 1
  • 1
Anton Semenov
  • 6,227
  • 5
  • 41
  • 69
  • 1
    Actually, you _can_ set global hooks with .NET. But it won't help here, because global hooks cannot be used to capture ctrl-alt-del. [Here's an example in C++ how-to hook](http://www.codeproject.com/KB/winsdk/AntonioWinLock.aspx) other system keycombi's and why ctrl-alt-del doesn't work. – Abel Aug 17 '11 at 07:10
  • mmm... global hook with .NET sounds good, but whould it be safe? I mean would it be work without conflicts with managed apps? – Anton Semenov Aug 19 '11 at 15:15
  • 1
    yes, it would be safe. Global hooks are not the same as, say, a shell extension. I.e., they are not injected in another process and as such it is safe to do with .NET and without conflicts. Of course, you'll have to use the Win API, but several .NET hook libs already exist, try this: http://www.codeproject.com/KB/cs/globalhook.aspx and this: http://support.microsoft.com/default.aspx?scid=kb;en-us;318804 – Abel Aug 22 '11 at 07:57
  • Global hooks can't intercept CTRL+ALT+DELETE because that is the secure attention sequence on Windows and the whole point of a SAS is that the OS always responds to it the same way. – Chris Smith Mar 17 '12 at 16:34
  • See http://stackoverflow.com/questions/310745/what-are-the-legitimate-uses-of-global-keyboard-hooks – Chris Smith Mar 17 '12 at 16:38