The Autorun.inf File:
Autorun.inf is the primary instruction file associated with the Autorun function. Its is a simple text-based configuration file that tells the operating system which file is to be executed, which icon to use. It tells windows/Unix based systems that what program has to be executed after insertion of CD/DVD/USB drive. It also executes the program when we Open/Explore/ (or by performing the specified task written in the file).
The entire sequence is initiated when the "disk change notification" polling discovers a new disk in the CD or DVD ROM drive. Then, if the "Auto insert notification" feature is enabled (it is by default), Windows checks in the new disk's root directory for the existence of an "autorun.inf" file. If found, Windows then reads and follows the specific instructions this file defines. If no autorun.inf file is found, then Windows refers to the new disk by its serial number and executes the default actions associated with the (data or audio) content on the disk.
You can disable Auto-execution of CDs/DVDs from gpedit.msc file. We will discuss later.
The Autorun.inf file defines the following:
| |
File extensions for various Platforms:
Autorun.mips : Mips Machine
Autorun.alpha : DEC Alphamachine
Autorun.ppc : Power p.c.
Autorun.inf File Structure:
The autorun.inf file is a simple text file that can be opened up in any text editor (e.g. notepad). It always starts with a section header of:
[autorun]
Bellow this header one can specify list of various operations with following syntax-
option=value
where option = option that you want to set
value = it's the value/comment that you are setting with the options
for example:
[autorun]
open=setup.exe
icon=setup.ico
Associating a program :
open=FileName.exe
open=FileName.bat
Setting the autoplay option :Autoplay is a function of XP and higher windows version. It tells the operating system what file will run when you insert CD/DVD/USB Drive. It shows a autoplay menu on the screen.If you want to add new autoplay option in the menu as "HELLO open this file " and this will execute hello.bat file then write this to your Autorun.inf file-[autorun]open=hello.bataction=Hello open this file
Adding Context menu items:There some basic operations in context menu (displays a menu list when you right click on the dive) like Open, Explore etc. if you want add your own then simply do these things-First you need to create an action give it name and what will it do when you click on it. all of these work is done by shell/verb option. For eg.-shell/Hello=Open Hello fileThis will create a new menu named "Hello" in the context menu displaying message "Open Hello file". Now set an operation on this menu-shell/Hello/command=hello.bat
Changing the default action:When you double click on any drive this will by default opens the drive. If you want to change the default option by your own command or existing list of commands do this with shell option.shell=Hello
Viewing a file instead of program execution:If you want to display a file / link to a web address than do thisshellexecute=FileName.txtshellexecute=http://cyberpk.blogspot.com
No comments:
Post a Comment