The "autorun" feature of Windows 95 and later allows a program to be executed right after a CD-ROM is inserted. For this to work, the system must have autorun enabled, and Auto Insert Notification ("AIN") must be turned on for the CD-ROM drive.
When preparing a CD-ROM for Windows, put a text file called "autorun.inf" in the root directory that contains something like this:
When inserted, the CD-ROM will be shown in the "My Computer" window with the specified icon. If the disc is inserted on a system with AIN and autorun enabled, the program named on the "open" line will be launched. Icons must be in Windows icon or bitmap format. You can't use a GIF or JPEG. Make it square, 32x32 pixels. If you're going to be doing a lot of these, you may want to try Axialis "IconWorkshop", from http://www.axialis.com/axicons/.
There doesn't appear to be a way to specify custom icons for individual folders.
Incidentally, the "root" directory is the top level of the disc, e.g. "D:\". (If you viewed a directory hierarchy as a tree growing upward, the topmost directory would be at the root of the tree.)
Here's a more complicated example:
open = setup.exe /i
icon = setup.exe, 1
shell\configure = &Configure...
shell\configure\command = setup.exe /c
shell\install = &Install...
shell\install\command = setup.exe /i
shell\readme = &Read Me
shell\readme\command = notepad help\readme.txt
shell\help = &Help
shell\help\command = winhlp32 help\helpfile.hlp
Taking it line by line, this says:
The default AutoRun command will be "setup /i"
The icon for the CD will be icon #1 embedded in setup.exe
Four commands will be added to the right-click pop-up menu:
which will run "setup /c"
which will run "setup /i" (same as auto-run in this case)
which launches notepad.exe to display "help\readme.txt"
which displays the file "help\helpfile.hlp" with the Win95 help facility
You can test the autorun features of a disc without recording one. If you SUBST a folder onto a drive letter, the autorun feature will scan the new drive. For example, from a DOS prompt, enter "SUBST J: \goodies\NewCD". This technique is also useful for testing out a CD-ROM you're preparing.
Ikuti pelatihan online produktivitas untuk lingkup bisnis, pribadi dan rumah tangga
Your organization need assisting in improving productivity and profitability at low cost? come to us
You need a discussion forum of management system such as QMS ISO 9000, TQM, lean mfg., EMS ISO 14000, OHSAS 18000, ISO/TS 16949, six sigma, BSC, and so on? join with us for free.