HOME | FAQ | ABOUT | TIPS |

search engine by freefind

 

autorun

you must have seen CD's which once inserted opens a file directly and have a different icon...... Well there is no magic behind it but just simple logic which is an Autorun file......

you must have noticed a AUTORUN.INF FILE IN EACH IF THOSE cd'S... SO WHENEVER YOU INSERT A CD WINDOWS CHECK WHETHER IT CONTAINS A AUTORUN FILE OR NOT.....IT IS GENERALLY A GUIDE TO THE CD...WINDOWS GO ACCORDING TO THE CONDITONS IT SPECIFY..................... SO WITH THE HELP OF IT YOU CAN SPECIFY A DIFFERENT ICON FOR YOUR CD AND A FILE WHICH WOULD OPEN WHEN ONCE THE CD IS INSERTED.........MAKING AN AUTORUN.INF IS AS EASY AS MAKING NOODLES.........SO HERE WE GOOOOOOOOOOOOOO!!!!!!!!!!!

STEP 1> OPEN YOUR NOTEPAD AND BEFORE WRITTING ANYTHING SAVE IT AS A autorun.inf FILE BY WRITTING "autorun.inf" IN THE SAVE AS FILENAME [PUT THE AUTORUN.INF IN QUOTES OR ELSE NOTEPAD WILL SAVE IT AS AUTORUN.INF.TXT]

Step 2> NOW HERE GOES THE PROGRAMMING
THE FIRST LINE OF YOUR PROGRAMMING SHOULD BE----

  • [autorun]      (this is the syntax)

NOW IT HAS TO BE FOLLOWED BY COMMANDS WHICH WILL GUIDE THE WINDOW THROUGH YOUR CD...... THESE COMMANDS INCLUDES-

  • icon=name_of_icon.ico

The icon command is used to specify a icon for your CD drive which window will display.....it can be used to define a .ico file or an .dll.......... defining an .ico is quiet easy all you have to do is to write the name of the icon and its extention thats is .ico ....... So if your name of icon is myspace then command will be ----    

icon=myspace.ico

For defining an .dll file you have you have specify the name of the dll file and the number of the icon so the syntax goes like this -----

icon=name_of_dll.dll,number of the icon

so if your dll file name is mydll and the number of your icon is 5, then the programming goes like this----

icon=mydll.dll,5

  • Label=your_text_label

The label command is used to specify a text label which the windows will display as the name of the cd drive ............So if you want to your CD label to be MyDisc ...The programming will go as----

label=MyDisc

  • open=name_of_file.exe

The open command is used to specify a program which will be executed once you enter your CD.....But the only problem is that it can only used to open an .exe..............So if you want to open an .ppt or .html or any other format file you have to add start to to name of your file.....So if if you want to open an file named project.ppt your programming would be----

open=start project.ppt

And if you want to open an exe file file called setup your programming would be ----

open=setup.exe

 

STEP 3> COPY THE autorun.inf, .exe and.ico file in the root directory of your CD and now whenever you put your insert your Disc you will have your CD with the label and icon you had specified, and the file you had spefied in the open command running automatically................

so your autorun proram would be like this -----

[autorun]

open=file.exe

icon=icon.ico

label=MyDisc

 

NOTE--By default, the system looks for the file in the root directory of the inserted disk. If you want to access a file located in a specific folder or subdirectory, specify a path relative to the root.

THAT IS, if your .exe or .ico file in a folder named apps then you would have to write-

  • [autorun]

  • label=mydisc

  • open=apps\file.exe

  • icon=apps\icon.ico

 

ICON OF AN .inf file

 

 

 

 

 

 

 

 

 
Free Web Hosting