Monday, May 25, 2009

Autorun Program From Removable Media

Autorun, as the name imply, allow program to autorun from removable storage (USB drive, CD-ROM...). This will give you simple guide on how to create a autorun removable storage

To create a autorun removable media, do the following step

1. Create a file call autorun.inf in the root folder of the removable media.

2. Open autorun.inf with any text editor program

3. At the top of the file, put [autorun]. [autorun] denote that this is a autorun file

4. In general, the autorun file setting is in name=value pair. (ie, icon=myicon.ico). The following give you some example of the name value pair

icon=xxx.ico -> allow you to set the icon of your autorun removable media

label=xxxx -> allow you to set the name of this removable media -> allow you to define the program with you want to be open when media is inserted

action=xxxx -> allow you to set the action name in the action prompt when you insert your media

shell\xxxx\command -> allow you to set XXXX to the context menu when you right click on the removable media in My Computer folder

shell=xxxx -> allow you to overwrite the default action. Note: If you has set up shell\xxxx\command, you can reuse xxxx as the shell= action

For better clarity, below is a workable autorun.inf example

label=My USB Drive
action=My Desktop Program

Depend on your Window Version, you may be prompted for Autorun action dialog. This is security feature to prevent malicious attack from removable drive.

No comments:

Post a Comment

Tomcat - removing server info

Below are the steps to remove Tomcat Server Information 1. Make sure Tomcat is not running 2. Navigate to "Tomcat Installation"...