PDA

View Full Version : blocking keyboard commnads


emma06
11-21-2006, 09:18 AM
hey everyone , need some help figuring how to block common keyboard commands such as:

Alt Ctrl Del, Windows Run, Windows E, Windows Pause/Break, Ctrl Esc, Alt Tab, Windows key,

Thank you

Lorne
11-21-2006, 09:44 AM
If this is on a kiosk system that your app will be running on permanently, and you just want to disable those keys completely, you could use KeyTweak (http://webpages.charter.net/krumsick/) to disable (some of) them. (I don't think this method would disable ctrl+alt+del as the system processes that before the scancode is translated.)

Or were you wanting to disable those keys only while your application is running?

usernameCasper
11-21-2006, 03:57 PM
Hey emma,

Maybe this is it what u want?

if System.IsKeyDown(13) then
-- The user is holding down the 'enter' key (13 is a virtual key integrated by --- AMS, you also can use the LuaScript).
end

I refer you to the helpfile inside AMS and search in the index on System.IsKeyDown. You find the values there !!
This will definitely help you ! :)

Kind Regards,
Casper

emma06
11-21-2006, 04:08 PM
hmmm... thank you guys. I'll see what I can do. Not experienced in AMS at all.

I will have my kiosk running on a lot of computers and different locations so the easiest way to disable keyboard keys is in my kiosk, if its just one computer I can disable a lot of functions from gpedit

usernameCasper
11-22-2006, 02:24 AM
nice ! :)
keep in mind you dont abuse this method for potential clients ;)
if you know what I mean :p

Kind Regards,
Casper

emma06
11-24-2006, 06:47 PM
hey guys this is not enough of information for me as a AMS starter. can I just pay someone to do this? or can I buy a plugin or some little copy and paste thingy.

Ham
11-24-2006, 07:15 PM
Well to disable ctrl+alt+del you can use a script like this (registery script):

REGEDIT4
[HKEY_CURRENT_USER\Software\Microsoft\Windows\Curre ntVersion\Policies\System]
"DisableTaskMgr"=dword:00000001


And here the reg script to enable it again:

REGEDIT4
[HKEY_CURRENT_USER\Software\Microsoft\Windows\Curre ntVersion\Policies\System]
"DisableTaskMgr"=dword:00000000


Remember that am not responsible for any damage it can bring on the system you install this script.

(This change does not affect how Windows works, merely changes the results on pressing ctrl+alt+del.)

emma06
11-25-2006, 01:09 AM
Ham, so I can put this code in the 'when application starts, and reenable alt ctrl del on application exit, so this should work right?

Mathew202
11-25-2006, 01:54 AM
this works fine, but you need to call from an external web file for this to work, AMS dose not support php file running

well i dont seem to be able to get it to work unless i call a remote file on a website.

Ham
11-25-2006, 07:29 AM
These are reg file's not php.

jfxwave
11-25-2006, 10:38 AM
This is what i use for Alt Ctrl Del but use this at your own risk!

Put this in On Startup.
Registry.SetValue(HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\\Poli cies\\System", "DisableTaskMgr", 1, REG_DWORD);


Put this in On Shutdown.
Registry.SetValue(HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\\Poli cies\\System", "DisableTaskMgr", 0, REG_DWORD);

emma06
11-26-2006, 03:10 PM
yep that works and thank you so much. ....but, anyone can help adding more command blocking: like let's say how to block 'locking the workstation' when you click alt-ctrl-del it blocks the task manager but still brings up the alt-ctrl-del menu with options like change password, lock computer, etc.

usernameCasper
11-27-2006, 04:57 AM
Hummm,
It can be done with regkeys, but make sure you know what you doing.
You want something like this: "gpedit.msc" in Start->Run (type without quotes) to give rights ?
I will have a closer look this week, im very busy last week.
-Casper

emma06
11-27-2006, 08:17 AM
Hummm,
It can be done with regkeys, but make sure you know what you doing.
You want something like this: "gpedit.msc" in Start->Run (type without quotes) to give rights ?
I will have a closer look this week, im very busy last week.
-Casper


gpedit will not work for this matter, Unless I can incorporate some script that will automatacly adjust all policy settings, I need to incorporate scipts in my kioks application.

usernameCasper
11-27-2006, 10:03 AM
Did you try the use of KeyTweak ?

jfxwave
11-27-2006, 01:45 PM
This is what i use to disable the Lock Computer button but use this at your own risk!

Put this in On Startup.

Registry.SetValue(HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\\Pol icies\\System", "DisableLockWorkstation", 1, REG_DWORD);
Put this in On Shutdown.

Registry.SetValue(HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\\Pol icies\\System", "DisableLockWorkstation", 0, REG_DWORD);

emma06
11-28-2006, 12:00 PM
this is great that I can add/remove registry values. My question is is there a way to add cmd command gpupdate /force I need to able to update policy settings on start up and exit

emma06
11-28-2006, 12:29 PM
Also do you guys know how to completely remove Windows Taskbar altogether?

rhosk
11-28-2006, 01:48 PM
http://www.indigorose.com/forums/showpost.php?p=27100&postcount=8

emma06
11-28-2006, 03:32 PM
any idea why all those reg values don't work? I actually even run the bat file to update polocy settings and still wouldn't work?

Registry.SetValue(HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\\Poli cies\\System", "DisableTaskMgr", 1, REG_DWORD);
Registry.SetValue(HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\ \Policies\\System", "DisableLockWorkstation", 1, REG_DWORD);
Registry.SetValue(HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\ \Policies\\Explorer", "NoRun", 1, REG_DWORD);
Registry.SetValue(HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\ \Policies\\Explorer", "NoLogOff", 1, REG_DWORD);
Registry.SetValue(HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\ \Policies\\Explorer", "NoClose", 1, REG_DWORD);
Registry.SetValue(HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\ \Policies\\Explorer", "NoSetTaskbar", 1, REG_DWORD);
Registry.SetValue(HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\ \Policies\\Explorer", "NoTrayItemsDisplay", 1, REG_DWORD);
Registry.SetValue(HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\ \Policies\\Explorer", "HideClock", 1, REG_DWORD);
Registry.SetValue(HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\ \Policies\\Explorer", "NoToolbarsOnTaskbar", 1, REG_DWORD);
Registry.SetValue(HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\ \Policies\\Explorer", "NoTrayContextMenu", 1, REG_DWORD);
result = File.Run("AutoPlay\\Docs\\gpupdate.bat", "gpupdate", "", SW_SHOWNORMAL, false);