Jump to content

Recommended Posts

I did this a while back. It starts IE in kiosk mode, and does a few other things. It was usefull for trying to build an IE based kiosk. I can't remember if I ever posted it. So, here it is:

; kioskwatch3.au3
; March 9, 2004

; Built with AutoIt3
; Starts Internet Explorer in Kiosk Mode and
; prevents any (Ctrl +) HotKeys from being used.

; March 3, 2004: Added Maintenance Mode
; Maintenance Mode starts a Command Prompt
; March 4, 2004: Script now block (Alt + Tab),
; and will close any Pop-up windows
; March 9, 2004: Added the function to check for 2 minutes of Idle Time

Global $StartTime

; Read in Maintenance Password
$maintpw = IniRead("C:\kw3.ini", "Settings", "PW", "")

Call ("StartTimer")

Run("runapp C:\Program Files\Internet Explorer\iexplore.exe -k http://URL")

AutoItSetOption("WinTitleMatchMode", 2);2 = Any Substring

While 1;Infinite Loop

; Handles IdleTime

  $MPos1 = MouseGetPos()
  $CPos1 = WinGetCaretPos()

; Handles Hotkeys

  If WinActive(" - Microsoft Internet Explorer") Then
    HotKeySet("!{TAB}", "Block")
    HotKeySet("^h", "Block")
    HotKeySet("^a", "Block")
    HotKeySet("^b", "Block")
    HotKeySet("^c", "Block")
    HotKeySet("^f", "Block")
    HotKeySet("^l", "Block")
    HotKeySet("^n", "Block")
    HotKeySet("^o", "Block")
    HotKeySet("^p", "Block")
    HotKeySet("^s", "Block")
    HotKeySet("^v", "Block")
    HotKeySet("^w", "Block")
    HotKeySet("^x", "Block")
    HotKeySet("^!z", "Maintenance")

; Block Pop-ups

  If WinExists("Connect to URL") Then
    WinClose("Connect to URL")

  If WinExists("Microsoft Internet Explorer", "&Yes") Then
    WinActivate("Microsoft Internet Explorer", "&Yes")

; Handles IdleTime (Continued)

  $MPos2 = MouseGetPos()
  $CPos2 = WinGetCaretPos()

  If $MPos1[0] <> $MPos2[0] Then
  ElseIf $CPos1[0] <> $CPos2[0] Then

  $EndTime = TimerStop($StartTime)

  If $EndTime > 120000 Then;120000 = 2 minutes

  Sleep(3);Reduces the load this script puts on the CPU time

Func Block()

Func StartTimer()
  $StartTime = TimerStart()

Func CloseIE()
  $title = WinGetTitle(" - Microsoft Internet Explorer")
  If $title <> "http://URL/ - Microsoft Internet Explorer" Then
    Send("!{F4}");Closes the Internet Explorer Window

Func Maintenance()
  $Password = InputBox("AutoIT3 - KioskWatch3 Maintenance Mode", "Enter KioskWatch3 Maintenance Mode Password:", "", "*")
  If $Password = $maintpw Then
    MsgBox(0, "AutoIT3 - KioskWatch3 Maintenance Mode", "Invalid Password!", 3)

I hope it helps someone. Let me know what you think?

Thanks again for all your help,


Edit: Works well if you make this Script the shell, or make a BAT file that calls this script the shell, I'm not sure. It may work as the shell if you compile (AUT2EXE) it.

Thanks again

Edited by ioliver

"Blessed be the name of the Lord" - Job 1:21Check out Search IMF

Link to post
Share on other sites

Just a few suggestions:

1) Perhaps use the following registry change to disable the ability to close internet explorer: [HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Internet Explorer\



2) I can't find the settings now, but it is possible to disable the menu items in the ctrl-alt-del menu so that the unscrupulous user can only choose 'Cancel" Alternatively you could choose start the task manager upon ctrl-alt-del and then immediately close it from the script

3) Lastly you should constantly check that iexplore.exe is still running lest the user use the alt-f4 keystroke to get past it.

Link to post
Share on other sites

Also need to disable the taskbar, windows keys, etc. Looks like you have a good start. Also make sure that you watch out for websites where they can add thier own links, like.

<a href="c:\">Access my Cdrive</a>

AutoIt3, the MACGYVER Pocket Knife for computers.

Link to post
Share on other sites

Thanks for checking out the script, and I appreciate all the suggestions. I may try to implement all those things to make a production version of the script.

When I wrote this script it was to replace a Netscape based Netsetter Kiosk application. So I used the script in combonation with some Local Group Policy settings and some Registry Hacks to do a lot of the things you suggested. Like, disable the Task Bar and the Ctrl + Alt + Del Menu items.

Thanks again for all your help, please continue to make suggestions as to how I can improve it, and when I get time I'll try to implement those.


"Blessed be the name of the Lord" - Job 1:21Check out Search IMF

Link to post
Share on other sites

These other keys will also help to lock the system down a bit more:


...Although these keys help to secure the system, please keep in mind that some would-be attackers are very determined and could still gain control of the box. It would also help to make sure that people don't have physical access to the power cord, floppy/cd drives, or USB/network ports on the system.

BTW: Good job on the script! :ph34r:

Link to post
Share on other sites

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
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...