Autorun.inf Command Format (Translation MSDN)

xiaoxiao2021-04-07  318

Autorun.inf command (translation MSDN)

This document is an introduction to the command in the autorun.inf file

[Autorun] command:

l icon

l Label

l Open

l shellexecute

l shell

l shell / verb

[DeviceInstall] command:

l DriverPath

[Autorun] command

Icon Command icon

The icon command develops an icon in the Microsoft Windows user interface that can be run.

Format: icon = icon file name [, index]

Parameter Description:

Icon file name

A .ico, .bmp, .exe, .dll file name containing icon information. If the file contains more than one icon, you must mark with an index starting from 0.

Remarks:

Icon and tags together in the user interface can be used to run the drive. For example, in a Windows browser, the drive's icon turns into a set specific icon, not a standard default disk icon. The icon file must be in the same directory with the file specified by the Open command.

The specified icon specified below is the second icon in myProc.exe file.

Icon = MyProc.exe, 1

Label command label

The Label command specifies a text tag as a disk name.

Use: label = label text

parameter:

Label text: A label text string can contain spaces.

Remarks:

The following example specifies the name of a drive as "My Disk"

Label = my disk

Experimental results:

The ICON and Label commands are expected in Windows XP, whether it is valid in the optical drive, mobile disks and fixed disks. But don't work in Windows 2000.

Open the command Open

The Open command specifies the path and file name of an executable file that automatically runs this program when the user is connected to the computer.

Use: open = [executable file path /] executable file name [parameter 1 [parameter 2] ......]

Parameter Description:

Executable file name

The full path name of the executable running when the CD is inserted. If there is only one file name, he must be in the root of the disk. If in the subdirectory, the path must be set. You can also include one or more parameters delivered for the running executable.

Remarks:

If you want to get more information about the starter, read the article in MSDN "Tips for Writing Autorun Startup Applications."

Experimental results:

This command can only be used when used in the optical drive, and the expected purpose cannot be achieved in the mobile disk and the fixed disk. Specific reasons, it is unclear.

Shellexecute command

Version 5.0 This command specifies that a executable or data file call SHELLEXECUTEEX is executed.

Use: shellexecute = [file path /] file name [parameter 1 [parameter 2] ......]

Parameter Description:

file path

Specifies the string of the path of the directory of the executable or the data file, if not specified, the file must be in the root of the drive.

file name

Contains a string of the file name. If it is an executable file, run. If it is a data file, you must be a member of FileClass, SHELLEXECUTeex starts to start commands for the default start command for the file class.

parameter

Contains any additional parameters delivered to SHELLEXECUTEEX.

Remarks:

This command is similar to the Open command, but it allows you to use the file association information execution program.

Shell command

The shell command specifies the default command for the drive right-click menu.

Use: shell = VERB parameter description:

Verb

Verb (verbs) in contact with the corresponding command must be defined in autorun.inf in autorun.inf.

Remarks:

When the mouse right click on the drive icon, a right-click menu appears. If there is autorun.inf, the default right-click menu is obtained. When the user doubles the drive icon, the command set by the shell is executed.

If you want to specify the default right-click menu command, first define the verbs, command lines, and menu names using the SHLL / VERB command. Then use the shell command to turn it into the default right-click menu command. Otherwise, the default menu item is "Auto Play", starts the command defined by Open or SHELLEXECUTE.

SHEL / VERB command

The shell / verb command adds a command to the right mole menu to the disk.

Shell / Verb / Command = Executable File Name

Shell / Verb = Menu Name

Parameter Description:

Verb

The verb name of the command. The shell / verb / command command associates the verb and an executable. Verb cannot contain spaces. The default display menu name is Verb content.

file name

Execute the executable path and file name of the command.

Menu name

This parameter specifies the text information displayed in the right mole menu, namely the name of the menu item. If this is omitted, the content of VERB is displayed. The menu name can be a case where the uppercase letter is mixed or the space can also be included. You can create shortcuts before letters.

Remarks:

When the user right click on the drive icon, a right-click shortcut menu appears. Add a shell / verb command to Autorun.inf to add a command to this shortcut menu.

Each command has two parts, they must declare on different rows. The first part is shell / verb / command, this is a must, this part is associated with a string, calling an action, starting the corresponding application when the command is executed. The second part is the shell / verb command, which is optional, his role is to set the name displayed in the shortcut menu.

Here is an example, the autorun.inf file will "NOTEPAD ABC / README.TXT". The menu name is "read me", "m" is defined as the shortcut key of the item.

Shell / readit / command = NotePad abc / readme.txt

Shell / readit = read & me /

[DeviceInstall] command

I have not understood this command, so I will not turn it!

转载请注明原文地址:https://www.9cbs.com/read-132420.html

New Post(0)