Autorun. inf full operation manual

Source: Internet
Author: User

According to the author: in view of the full introduction of autorun on the Internet. there are not many articles about the inf function. I found an autorun article on the official Microsoft website's official website, called "inf. description of inf in English. This article is written by the translator and the author himself. (Thanks to the excellent articles provided by the author)

======= I am a separator =====

1. autorun. inf is a file used to manipulate the disk behavior in windows. It must be placed in the root directory of the disc. Some operations are also applicable to hard disks.

2. autorun. inf can be disabled. The method is as follows:

Click Start> Run and enter regedit or regedt32 in the text box. Expand HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionPoliciesExploer in sequence. The NoDriveTypeAutoRun sub-key limits the scope of Autorun. The default value is 95 (hexadecimal ).

You can set the device flag to the key value after adding the disabled device flag. The device flag is as follows:
1: Unidentifiable devices (prohibited by default)
2: A device without a root directory (Drive without root directory has an unknown meaning. We recommend that you disable it. It is disabled by default)
4: removable devices (USB flash drives are recommended to be disabled. Many viruses are infected by the Autorun. inf of USB flash drives, Which is disabled by default)
8: fixed device (hard disk, do it by yourself, not prohibited by default)
16: network device (web drive, prohibited, disabled by default)
32: Optical Drive Device (CDROM, disabled by default)
64: virtual storage device (RAM, which is not recommended by default)
128: other drives not specified (Reserved bits are recommended. disabled by default)

3. The autorun. inf file is divided into three parts: [AutoRun] [AutoRun. Alpha] [DeviceInstall].

[AutoRun] Applicable to Windows 95 and above systems and 32-bit CD-ROM, required.
[AutoRun. alpha] It is applicable to the Computer Optical Drive Based on the server learning Ram role. It is applicable to Windows NT 4.0 and is optional.
[DeviceInstall] Applicable to Windows XP and later systems. Optional.

4. [AutoRun] commands and their details.

1. DefaultIcon
Meaning:
Specifies the default icon of the application.
Format:
DefalutIcon = icon pathname [, serial number]
Parameters:
Icon file name: the name of the application. Format: .icow.bmp. .exe and. dll. When the file format is .exe and. dll, the serial number is sometimes used to specify the icon.
Serial number: when the file format is .exe and. dll, the file may include an extra icon. In this case, you need to use the serial number to specify the icon. Note that the serial number starts from 0.
Note:
The default icon of the application is displayed in the driver display window of the windows explorer core instead of the default icon of the device.
The default directory of the icon path name is the device root directory.

2. Icon
Meaning:
Specify the display icon of the device.
Format:
Icon = Icon pathname [, serial number]
Parameters:
Icon file name: the name of the application. Format: .icow.bmp. .exe and. dll. When the file format is .exe and. dll, the serial number is sometimes used to specify the icon.
Serial number: when the file format is .exe and. dll, the file may include an extra icon. In this case, you need to use the serial number to specify the icon. Note that the serial number starts from 0.
Note:
The device display icon is displayed in the driver display window of the windows explorer core instead of the default icon of the device.
The default directory of the icon path name is the device root directory.
This command is invalid when the default application icon (DefaultIcon) exists.

3. Label
Meaning:
Device description
Format:
Label = Description
Parameters:
Description: any text, which can contain spaces.
Note:
The device description is displayed in the driver display window of the windows explorer core instead of the default description volume of the device.
In the driver display window of a non-windows explorer core (for example, right-click the device and select Properties), the volume label of the device is displayed.

4. Open
Meaning:
Specifies the command line that is run when the device is enabled.
Format:
Open = command line
(Command line: Program path name [parameter])
Parameters:
Command Line: the command line that runs automatically. The command line is the. exe).com;.batfile, which can be opened using start.exe or ShellExecute.
Note:
The START directory of the command line is the root directory of the device and the $ Path environment variable of the system.

5. ShellExecute
Meaning:
Specifies the file to be executed when the device is enabled. (Unknown Operating System Support)
Format:
ShellExecute = Execution file path name [parameter]
Parameters:
Execution file path: the name of the execution file when the device is enabled. It can be a file in any format. The system calls the set program to execute this file.
Parameter: parameter, which is adjusted according to the execution File
Note:
The START directory of the command line is the root directory of the device and the $ Path environment variable of the system.

6. Shell keyword \ Command
Meaning:
Right-click the device and choose execute command line.
Format:
Shell keyword \ Command = Command line
(Command line: Program path name [parameter])
Parameters:
Command Line: the command line automatically runs. The command line is the. exe).com;.batfile, which can be opened using start.exe.
Note:
The START directory of the command line is the root directory of the device and the $ Path environment variable of the system.

7. Shell keywords
Meaning:
Define the context menu Text of the device.
Format:
Shell keyword = text
Parameters:
Keyword: used to mark menus. It can be expressed by any character, including spaces.
Text: The text displayed in the right-click menu. It can contain any character and cannot contain spaces.
Note:
In the same Autorun. inf file, different context menu keywords are different, and the same context menu keywords are the same.
In the context menu text, you can use & set the accelerator key, & Output &.
The Shell keyword \ Command Shell keyword is indispensable, and the order does not matter.
When the Open, ShellExecute, and Shell commands are not available, the first device right-click menu to specify the command is run when the device is enabled.

8. Shell
Meaning:
Define the device right-click command when the device is enabled.
Format:
Shell = keyword
Parameters:
Keywords: marked menu keywords
Note:
The keywords specified by Shell can be in any part of the AutoRun. inf file.
The priority defined after the OpenShellExecuteShell command is high.

4. Introduction to commands in [AutoRun. alpha.

The commands in the [AutoRun. alpha] section are the same as those in the [AutoRun] section, except that in the computer drive based on the RISC, the [AutoRun. alpha] takes precedence over [AutoRun].

5. Some [DeviceInstall] commands and their details.

DriverPath
Meaning:
Define the search driver directory.
Format:
DriverPath = driver path
Parameters:
Driver path: the path of the driver, including its sub-path.
Note:
Windows XP or above.
Only CD-ROM support
When the system detects a new device, it prompts the user to find the driver of the device. When a user clicks on this CD-ROM, when the [DeviceInstall] Part exists, the system looks for the driver according to the path marked by DriverPath. Unmarked paths are ignored. If the [DeviceInstall] Part does not exist, the system will perform a full search.
If you do not want the system to search for drivers in this CD-ROM, add only one line of [DeviceInstall] without the DriverPath command.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.