Professional Webmasters Community
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Facts about autorun.inf

2 posters

Go down

Facts about autorun.inf Empty Facts about autorun.inf

Post  andry Thu Jun 10, 2010 12:49 am

Hi everybody ! Here is the hottest thing for everyone. You must have seen some applications changing the icons for your drive or you have just seen that whenever you insert any cd/dvd into the drive, without doing anything, an application starts executing that can be any flash file or can be any html file. DO you know how it happens? It's just a simple small information file, which does the magic. It is named as "autorun.inf". This is the file which works to make any drive autorun.

Yes , even you can make your pen drive auto run or can make autorun cds easily. Now lets start with the file contents of the autorun.inf Open a notepad and start writing the following code in the notepad:


Code:

[autorun]
open=any_exe_or_batch_file
icon=any_icon_file_for_your_drive
Label=name_of_the_drive

I have mentioned the basics of the autorun.inf and there are some advanced things you can do with the autorun.inf. Like you can create your own commands for the right click on your drive.

Code:

shell/custom_option/command="any_exe_or_batch_file_to_run"

or example, you can reset the work of "explore" function of the right click menu on the drive. Suppose you want to execute a file whenever you right click the drive and select the option "explore",then the command would be as follows:

Code:

shell/explore/command="desired_exe_file"

If you want to create any custom event then the code would be as follows:

Code:

shell/my_event/command="any_exe_or_batch_file"

One option thing more can be done.Instead of using "open" code, we can use another keyword "shellexecute". in that case the code will be:

Code:

shellexecute="any_exe_or_batch_file"


Note : File must be saved as "autorun.inf" and should be stored at the root of the drive.Second thing Open event will work, whenever you double click the drive to open for fixed drives whereas in the case of removable drives, when you insert the drive,Open event will work.
andry
andry
Moderator
Moderator

Posts : 467
Join date : 2010-05-07

Back to top Go down

Facts about autorun.inf Empty Re: Facts about autorun.inf

Post  Alex_tom Fri Jun 11, 2010 3:16 am

Thanks. It's really valuable infomation that you gave. I am going to try all of these tricks.

Thanks again and hope you will keep us update.

Alex_tom

Alex_tom
New Moon
New Moon

Posts : 42
Join date : 2010-05-07

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum