Jump to content

[SOLVED] How do I prevent Alt+F4 from being pressed ANYTIME?


Recommended Posts

Posted (edited)

Hey guys,

 

Need some advice on how to prevent Alt+F4 from being pressed to exit Windows Internet Explorer 7 when running in Kiosk mode [iexplore.exe -k]. I've tried googling for the last 2 days, and researching a solution, but the only thing I can find is people wanting to get ALT+F4 stopped in their own program when using "forms". I'm not designing a program, I just want to stop ALT+F4 from being pressed to close windows ANY time in windows. I finally got the windows key disabled with a simple registry hack, but it doesn't appear to be that simple with ALT+F4. If anyone has any advice I'd really appreciate it. Working on building a library Kiosk, and it's still sitting in my office here on the work bench as I'm trying to make it absolutely perfect and tamperproof, but that's the one way I can always get around it.

 

Also, do you know if there's some way I can edit the hosts file or something, or play with the Windows Internet Explorer security settings to make ANY address typed, for example, google.ca or msn.com, go to the library homepage instead? As in, the browser will only view that site and nothing else? If not that's ok, I was just going to remove the default gateway from the machine and give it a static IP so it can only view internal sites. That's just a bonus question :) The real issue is just ALT+F4, because if the window is closed, they're left with a blank desktop with no permissions, even hitting the power button won't shut the machine down, you have no choice but to hold the power button and kill it.

 

Thanks!

Edited by link470
Posted

Have you got all the other key combos (CTRL+W etc) sorted too?

 

Have you considered using a Linux kiosk solution instead, or is the site/sites you need the kiosk to access built so they only work with IE? Lots of LiveCD ones out there you could test before running with.

  • Thanks 1
Posted
If completely disabling the F4 key is an option you can simply mod the registry hack you did for the Windows key and kill both in the same entry
  • Thanks 1
Posted

Thanks everyone for your replies! This is great information.

 

Have you got all the other key combos (CTRL+W etc) sorted too?

 

Not yet, I tried the keyboard layout creator tool and didn't get too far. Apparently I can't outright disable the alt or ctrl keys, which I guess is ok so that kids can copy paste between forms if needed on the search site.

 

If completely disabling the F4 key is an option you can simply mod the registry hack you did for the Windows key and kill both in the same entry

 

I like that thought. I actually got the registry hack off a website. This is the registry edit here:

 

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer]
"NoDriveTypeAutoRun"=dword:00000091
"NoWinKeys"=dword:00000001

 

Anyone know how I'd be able to do that for other keys to fully disable them? The issue with the registry edit is it doesn't fully disable the Windows Key, it just disables the Windows + [key] shortcuts. Which is basically all I need so that's good. So I can tap the windows key and the start menu still pops up and goes down on another tap. But if I use Windows Key+M or Windows Key+D etc. for "hiding" windows, that doesn't work. So that's good.

 

Anyone know how to do this with other key combos?

Posted

Alright guys, I found a solution. It's not software. I took apart the keyboard, and I had a look and noticed there was 4 layers inside the keyboard. The first layer at the top was the rubber buttons that make contact with the lower layers. Then the next layer was some type of contact sheet with points on it for each key, then below that was a plastic shield that kept it having JUST enough space between the contact sheet right below it. So I thought oh ok I get it, so if the two sheets make contact, they make a keystroke. So knowing that, I took small circular stickers and put them above the contact at the bottom for each key I wanted to block, so that when a key was pressed, the top wouldn't make contact with the bottom, and nothing happens. Here's the results :D :

 

http://i198.photobucket.com/albums/aa188/link4scott/keyboardkeydisable.jpg

  • Thanks 1
Posted
Alright guys, I found a solution. It's not software. I took apart the keyboard

 

Er, bit extreme innit? :D

 

Could try this instead of hacking your keyboard:

 

Copy and paste following into a txt document, save with .reg extension

 

Windows Registry Editor Version 5.00

 

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]

"Scancode Map"=hex:00,00,00,00,00,00,00,00,07,00,00,00,00,00,5B,E0,00,00,5C,E0,00,00,3E,00,00,00,38,00,00,00,38,E0,00,00,1D,E0,00,00,00,00

 

(Make sure you disable the requirement for Ctrl+Alt+Del at logon otherwise you're going to have an interesting time after you reboot!)

 

Apply and reboot.

 

Should disable F4, both Windows Keys, both Alt keys, and right Ctrl.

 

Can still access start menu with Left Ctrl+Esc, can still copy and paste.

 

Delete it and reboot to reverse it.

 

PM with any probs.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...