Autorun Tips and Tricks

AutoRun tricks: Change a drive icon

Here’s a little trick you can use to change the icon for a drive, e.g. your hard drive, from the boring default icon to something else. First, use Notepad to create a file called Autorun.inf and save it in the root directory of the drive whose icon you want to change. In that file, you need to enter two lines. Here’s an example:

[autorun] ICON=C:\Windows\System\Shell32.DLL,21

This tells Windows to display icon number 21 for whatever drive you saved this autorun.inf in. Shell32.DLL is a Windows system file that contains all the Windows icons. But you can also create your own icon or point to another icon somewhere else on your hard drive. Just specify the path and file name in the ICON= line. If it doesn’t seem to work right away when you’re done, you might have to go to View/Refresh or hit the F5 function key to refresh the screen and have Windows update the icon.

AutoRun tricks: Make your own CD AutoRun

Another situation you can use the AutoRun feature for is if you have a CD burner and created your own CD. You could write a batch file to run whatever program is on the CD, e.g. an installer. Then create an Autorun.inf file and put in the root directory of the CD and specify in that file to run the batch file automatically. For example:

[autorun] OPEN=Path\YourBatchFile.BAT
ICON=Path\YourCustomIcon.ICO

Leave a Comment: