views:

254

answers:

5

I need to create a simple Delphi application, kiosk style.

It is a very simple thing, a single form where the user writes some personal info to register to an event. 4 TEdit and a TButton.

What I want to achieve is to avoid the user does any action different then typing in TEdit or clicking on the TButton. For example I don't want he does ALT TAB (switchin applications), pressing windows key on keyboard, doing ctrl-alt-canc, etc...

I can add a passowrd protected Button that enables/disables this "Kiosk mode", in this way as I need to exit the kiosk mode I simply press that button and exit.

How to achieve this "kiosk mode" in Delphi without intercepting all the keystrokes manually? Or did anyone already develop this so it can be shared?

+3  A: 

You can try Change the Windows Shell.
When you start windows, you don't execute the default shell (explorer.exe), you can execute your application.

Al internet you can find alternative Shell (more attractive) to default windows like:

This option is used for purposes similars at the application that you are developing. Kiosks or TPV.
For change the default applicacion you must modify a registry key:

In Win3.x and Win9x, SYSTEM.INI file:

[boot]
shell=MiAplicacion.exe

In Win2k and WinXP, use Registry:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]
Shell=MiAplicacion.exe 

If you test this option, think the mode to turn the configuration to the original value (button or option). You must reboot to test changes.

ADDED: In addition, if you search on the web some similar at this "Delphi Change default windows shell", you can find more code, samples and information about this.

Regards

P.D: Excuse me for mistakes with english.

Neftalí
+1  A: 

Well but if someone can open the taskmgr he could just create a new task and run explorer.exe from there so its not really secure though...

Ok Taskmgr can be stopped with policies... Well and for disabling the cad sequence you can use saslibex which Remko Weijnen had created you can find it here: SASLibEx

kindest regrads,
s!

stOrM
+1 for mentioning my SasLibEx :-) which can indeed block CAD but also simulate it, unlock the workstation (without credentials) and much more
Remko
+4  A: 

Go through this link , it may help you

Bharat
Very interesting, hope it works on Windows 7... Yes it works as described here: http://www.dwinlock.kassl.de/
Anyway it is not a free component
+4  A: 

I think you'd better create a new desktop, and run your app in there. When your app is done, you can bring back user's desktop. That is how Windows login screen works. Of course Windows login screen uses a special secure desktop. Your app in a separate desktop would be isolated. You will have a desktop background with no start menu, taskbar, or desktop icons because explorer.exe is not running there automatically. Of course a can start a new process, using Task Manager, but desktops in Windows are securable objects; therefore, you can make restrictions if you want. Of course if your app has sufficient permissions.

To create a new desktop, you can use CreateDesktop Windows API, and to switch to the newly created desktop, you can use OpenDesktop function.

vcldeveloper
+1, VERY good suggestion (and additionally block the Secure Attention Sequence aka Ctrl-Alt-Del).
Remko
Yes very good suggestion, but can you redirect to a working example because research from scratch makes me favour the commercial component mentioned by Bharat
A: 

If you don't mind a commercial solution, check out DWinLock.

http://www.kassl.de/winlock/index.shtml

Warren P
Warren, Bharat's answer already links (indirectly) to DWinLock.
Remko