macdevcenter.com
oreilly.comSafari Books Online.Conferences.

advertisement

AddThis Social Bookmark Button

Kiosk Mode in Internet Explorer 5
Pages: 1, 2

Once you've done that, double-click the MENU resource in the IE Kiosk window. This will open a "MENUs" window which shows all the menus in the application. Double click the File menu, probably ID 257. In this menu editor, scroll to the bottom of the menu commands displayed and click the Quit item. Note that this will not quit anything, it just selects that command from the list of commands in the File menu. Click the Delete key or choose "Clear Item" from the Edit menu to remove the Quit command. Do the same to the "Work Offline" command and the two dotted separator lines now at the end.

Screen shot -- click for full-size view.
Accessing the Menu file in ResEdit -- click for full-size view.

If you want to remove the user's ability to print or to transfer favorites, delete the Print and Favorites commands from the File menu as well. What you will not be able to do is delete the Favorites commands without deleting the Print commands. Mac IE uses the position of commands in menus, so you cannot delete a command from the middle of a menu; you have to delete commands from the end of the menu.



In the same manner, remove the Preferences command and separator line from the Edit menu, probably menu ID 258. You may also want to delete some commands from the View menu. Remember, you can only delete commands from the end of the list, and you cannot delete the menu resource itself. When you're done, choose "Save" and quit ResEdit.

If you make a mistake, choose the "Revert File" command from ResEdit's File menu to revert to the last saved version of the file. If you saved the file with a mistake, you will have to close the file, trash it, and make a new copy in Finder.

Now try running the IE Kiosk application. You should be able to navigate between pages but should not be able to quit it or change preferences. If it crashes, throw out your IE Kiosk application and ResEdit another duplicate, and don't delete so many commands this time.

Also in Mac Hacks:

IE 5: Printing Framesets

Mac Hacks: Wild Hard Drive

Mac Hacks: The Launch

And a dash of AppleScript ...

If it doesn't crash, you will need to know how to quit it without a Quit command. The easiest way is to force-quit it by pressing Command-option-esc, but a more elegant method is to use AppleScript. Open the Apple Script Editor application and run the following command:

tell application "IE Kiosk" to quit

Stay out of my Finder!

Now you have a kiosk application that users can't easily quit, and they can't change the preferences. If you want to prevent users changing system preferences or running other applications, you have to prevent them from running Finder.

To do this, first create an alias to the IE Kiosk application and drag it to the Startup Items folder in your system folder. Then run the Script Editor program again and save a compiled script file with the command:

tell application "Finder" to quit

into the Startup Items folder.

Now, when you restart, Finder will quit, your kiosk application will start, and users will not be able to run any Mac OS applications or change your machine configuration. The only way to get out of this is to hit Command-option-esc or the reset button on your Mac and hold the Shift key down so it starts without running Startup Items. If you take the interrupt button and keyboard away from the kiosk even people who know how this works won't be able to escape it.

The same principle can be used to make kiosk modes out of many applications. Note that not all applications will run after their resources have been edited in this way.

Richard Hough is a web developer for a Vancouver, Canada educational software company.


Read more Mac Hacks columns.

Return to the Mac DevCenter.