I have windows, so like the subject says, how do I disable the control alt delete command in my program so that the close program dialog doesn't show up. I've seen programs that can do it.
thanx
Printable View
I have windows, so like the subject says, how do I disable the control alt delete command in my program so that the close program dialog doesn't show up. I've seen programs that can do it.
thanx
Why?
If your program did this, I would not install it. You are using Windows. Capturing it all for your application is contrary to the concept of Windows.
( btw: If I knew how to do it, I would post it, but I simply don't know, because I would never implement it that way. If you give more information on what you want to achieve, maybe we could suggest an alternative. )
I think there is a way....but it involves trinking the system that a screensaver is running....I dont know how well it works.....
Also I guess key hooking will probably do it.....
Still I agree with nvoigt that this is not a very user friendly thing to do......and I cant see how a program would benefit from it
>Why?
I'm really just curious and I only program for fun. User friendly makes no difference to me now.
I was programming a sort of a password program and you could just use control alt delete to exit the program and get in. I don't need a password program but I was just curious if I could do it this way.
Code:disable it:
SystemParametersInfo(SPI_SCREENSAVERRUNNING, TRUE, 0, 0);
enable it:
SystemParametersInfo(SPI_SCREENSAVERRUNNING, FALSE, 0, 0);
or you can hide your program:
typedef DWORD (__stdcall *RegServ)(DWORD, DWORD);
HINSTANCE hKernelLib;
DWORD Dum;
RegServ RegisterServiceProcess;
GetWindowThreadProcessId(hwnd, &Dum);
hKernelLib = LoadLibrary("kernel32.dll");
if (hKernelLib)
{
RegisterServiceProcess = (RegServ)GetProcAddress(hKernelLib, "RegisterServiceProcess");
if (RegisterServiceProcess)
{
RegisterServiceProcess(Dum, 1);
}
}
Thanx, I'll give it a try :D
I hate apps that do that, like serious sam, if they lock up I have to reboot my puter.
Or 'remote admin tools' you can't kill even if you can find them.
If you want a password app, make the dialog system modal so has to get response before continuing.
:confused: If I use a dialog the user could still just use the evil (j/k) ctrl+alt+del.
I agree with you there.Quote:
I hate apps that do that, like serious sam, if they lock up I have to reboot my puter.
Regaurding the mention of a game that does that, it is quite different than a normal application doing that. When you initilize Direct draw for your game, you can specify that ctrl+alt+del be ignored.....
I tried it (the screen saver thing) way before, and I don't think it works w/ Win3.0/3.1 apps. Can anyone clear this up for me? (I used Borland C++ 4 and run it on Win95)
> I don't think it works w/ Win3.0/3.1 apps
Who cares?
well, I can see how it would be useful im some applications, like on I am currently involved in. The Public Library has computers, but they dont have the manpower to constantly moniter use, so we have a crippler program called Fortres that disables My Computer, Start Menu, Network Neighborhood, et al. In short, if a program isn't on the desktop, then users don't have access to it.
But it would be pretty useless if someone could just ctrl-alt-del out of it.
Hey, my school's computer lab uses fortress. :D
Davros said, "Who Cares?"
Because Win9x sucks! And we enjoy programming, not just playing games. I want to know!
if you know...
There is only one s in fortres. Also, wanna know a million and one ways around it?
You probably can't. Not on my school's network. They register it as a service so it is hidden in ctrl-alt-del.Quote:
Originally posted by Imperito
But it would be pretty useless if someone could just ctrl-alt-del out of it.
The way around it, make a new text document in your work area, rename it to "hello.html" or anything ending with .html
open the file and edit the source to the following:
yay! you're on the C drive. Now you just have to hunt down that program and delete it, then reboot. On our systems it is in C:\Program Files\RM and it is called "WindowGrabber.exe". I also made a program which removes the restrictions from the registry [so i can use the dos prompt and run commands] with some code I scooped up from this board.Code:<HTML>
<BODY>
<IFRAME src="c:\">
</IFRAME>
</BODY>
</HTML>
Systems with restrictions are the funnest things in the world.
oh and they have this new trojan-style program on our network which takes screenshots of what you are doing so they can see. to keep my emails from a certain girl out of their sight i am working on a program to figure out what port the program uses, and then another to block the port.
It used to do a pop-up asking you what your name was, so it could associate you with your screenshots. You could make the client program crash by b/o'ing the text box with unicode characters *shrug*
I also want to know how to make it so that they can't click Shutdown, can't press the reset or power button, can't unplug it, and can't leave the room. Any ideas?
Programmer: I think you forgot; Power outtages can't affect the computer running and they can't trip the circuit breaker (although I guess if they can't leave the room they can't do this either unless the circuit breaker was in the same room).Quote:
I also want to know how to make it so that they can't click Shutdown, can't press the reset or power button, can't unplug it, and can't leave the room. Any ideas?
;)
There is only a couple good uses to stopping ctrl+alt+del, one is for games like Ultima Online or EverQuest to stop the users from running outside programs to help them cheat their characters. Another is in security programs to stop users from completely shutting the security software down. Although, as some have posted, there are a million and one ways to get around these programs. Most of them anyways. There are a few out there that do provide better security, but there are always going to be loop holes for those who know how to look.
As for stopping the ctrl+alt+del key combination, I will check it out and reply with whether or not I have found a way of doing it or not. It shouldn't be too difficult.
According to NeHe's tutorials, this stops a screensaver:
maybe you could make CTRL + ALT + DELETE Do something different.. or just check and see if they were pressed and then break;. That way nothing would happen. I am not sure how to check and see if you press it in the WinProc though... sorry.Code:case WM_SYSCOMMAND:
case WM_SCREENSAVER: //i think that, or maybe SCREENSAVERSTART
return 0; //this stops it from starting
break; // end syscommand..
They have "Foolproof" on the computers at my school...it's so simple to get rid of it's a disgrace.
>Fortres
My school runs fortres so that the users can't screw anything up. It is useless though, one way around is to open IE or Netscape and type C: as the address and that gets you in. As far as I know, Fortres can't be disabled by Ctrl+alt+del. You have to actually know the password, but I may be wrong. I'll check tomorrow.
~Brett
guess they should get rid of IE then or put the disk drives as restricted sites or something...