词条 | Autorun.inf |
释义 |
An autorun.inf file is a text file that can be used by the AutoRun and AutoPlay components of Microsoft Windows operating systems. For the file to be discovered and used by these component, it must be located in the root directory of a volume. As Windows has a case-insensitive view of filenames, the autorun.inf file can be stored as AutoRun.inf or Autorun.INF or any other case combination. The AutoRun component was introduced in Windows 95 as a way of reducing support costs. AutoRun enabled application CD-ROMs to automatically launch a program which could then guide the user through the installation process. By placing settings in an autorun.inf file, manufacturers could decide what actions were taken when their CD-ROM was inserted. The simplest autorun.inf files have just two settings: one specifying an icon to represent the CD in Windows Explorer (or "My Computer") and one specifying which application to run. Extra settings have been added in successive versions of Windows to support AutoPlay and other new features. The autorun.inf fileautorun.inf is an ASCII text file located in the root folder of a CD-ROM or other volume device medium (See AutoPlay device types). The structure is that of a classic Windows .ini file, containing information and commands as "key=value" pairs, grouped into sections.[1] These keys specify:
AbuseAutorun.inf has been used to execute a malicious program automatically, without the user knowing.[4][5] This functionality was removed in Windows 7 and a patch for Windows XP and Vista was released on August 25, 2009 and included in Microsoft Automatic Updates on February 8, 2011.[5][8][9] Inf handlingThe mere existence of an autorun.inf file on a medium does not mean that Windows will automatically read it or use its settings. How an inf file is handled depends on the version of Windows in use, the volume drive type and certain Registry settings. Assuming Registry settings allow, the following autorun.inf handling takes place:
On any drive type, the autorun.inf is read, parsed and instructions followed immediately and silently.[2] The "AutoRun task" is the application specified by the
Introduction of AutoPlay. Drives of type DRIVE_CDROM invoke AutoPlay if no autorun.inf file is found. Drives of type DRIVE_REMOVABLE do not use the autorun.inf file.[1] Any discovered removable media are handled by AutoPlay. All other handling is as before.
Drives of type DRIVE_FIXED are now handled by AutoPlay. Any specified AutoRun task appears as an option within the AutoPlay dialog together with any text specified by the optional Drives of type DRIVE_REMOVABLE now use autorun.inf but continue to be handled by AutoPlay. Any specified AutoRun task needs to be paired with the mandatory All other handling is as before.
The AutoRun task is no longer automatically and silently executed on any drive type. All volumes are handled by AutoPlay which, by default, will present an appropriate dialog to the user.
For all drive types, except DRIVE_CDROM, the only keys available in the [autorun] section are There is a patch available, KB971029 for Windows XP and later, that will change AutoRun functionality to this behaviour.[5] A simple exampleThis simple autorun.inf file specifies setup.exe as the application to run when AutoRun is activated. The first icon stored within setup.exe itself will represent the drive in Explorer: SectionsFollowing are the sections and keys allowed in a valid autorun.inf.[3] There also exist architecture specific section types for systems such as Windows NT 4 running on RISC. However these are long outdated and not described here. [autorun]The autorun section contains the default AutoRun commands. An autorun.inf file must contain this section to be valid. Keys allowed are:
Windows XP SP2 or later; drives of type DRIVE_REMOVABLE and DRIVE_FIXED Specifies text used in the AutoPlay dialog to represent the program specified in the If the (action) key does not appear on drives of type: ; DRIVE_REMOVABLE the AutoPlay dialog appears but without additional menu items. Essentially, the AutoRun task is omitted. This makes the action key mandatory for drives of this type. ; DRIVE_FIXED default text is created and used in the AutoPlay dialog. On all other drive types the key is ignored.
The name of a file resource containing an icon. This icon replaces the standard drive icon in Windows Explorer. This file must be in the same directory as the file specified by the
Specifies a text label representing the drive in Windows Explorer.
Specifies the path, file name and optional parameters to the application that AutoRun launches when a user inserts a disc in the drive. It is the CreateProcess function that is called by AutoRun. Note that if the application name includes spaces the path should be enclosed in double quote, e.g. open=""spread sheets.exe""
Windows 2000, Windows ME or later Similar to open, but using file association information to run the application. The file name can therefore be an executable or a data file. It is the ShellExecuteEx function that is called by AutoRun.
Windows XP or later; drives of type DRIVE_CDROM Use AutoPlay rather than AutoRun with CD-ROMs. The action taken on CD-ROM insertion will depend on the version of Windows being used. On versions of Windows earlier than XP, this key has no effect and actions specified by On Windows XP and later, the user will be presented with the AutoPlay dialog and any actions specified by
Adds a custom command to the drive's shortcut menu. verb is a string with no embedded spaces. verb is also the text that will appear in the shortcut menu unless specifically altered to some other text. See below for an example.
Optionally specify the text displayed in the shortcut menu for the verb above. Use an ampersand (&) to select a hotkey for the menu. See below for an example.
Defines the menu command referred to by Example: [Content]Windows Vista or later The Content section allows authors to communicate the type and intent of content to AutoPlay without AutoPlay having to examine the media. Valid keys are:
display the handlers associated with that content type
do not display the handlers associated with that content type Example: [ExclusiveContentPaths]Windows Vista or later Limits AutoPlay's content search to only those folders listed, and their subfolders. The folder names are always taken as absolute paths (a path from the root directory of the media) whether or not a leading slash is used. Example: [IgnoreContentPaths]Windows Vista or later AutoPlay's content search system will not scan the folders listed, nor their subfolders. IgnoreContentPaths takes precedence over ExclusiveContentPaths so if a path given in a [IgnoreContentPaths] section is a subfolder of a path given in an [ExclusiveContentPaths] section it is still ignored. Example: [DeviceInstall]Only Windows XP[3] This section is used to indicate where driver files may be located. This prevents a lengthy search through the entire contents of a CD-ROM. Windows XP will fully search:
without this section present. All other media should include this section to have Windows XP autodetect any drivers stored on that media. The section is not used with AutoRun or AutoPlay and is only referred to during a driver installation phase. The only valid key is: which lists a path Windows will search for driver files. All subdirectories of that path are also searched. Multiple key entries are allowed. If no Example: References1. ^1 {{Cite web| url = http://msdn.microsoft.com/en-us/library/cc144206(VS.85).aspx| title = Creating an AutoRun-Enabled Application| publisher = Microsoft| work = MSDN Library}} [6][7][8][9]2. ^{{Cite web| url = http://support.microsoft.com/kb/136214| title = How to Test autorun.inf Files| publisher = Microsoft| work = Knowledge Base}} 3. ^1 2 3 4 {{Cite web| url = http://msdn.microsoft.com/en-us/library/cc144200(VS.85).aspx| title = Autorun.inf Entries| publisher = Microsoft| work = MSDN Library}} 4. ^{{Cite web| url = http://blogs.msdn.com/e7/archive/2009/04/27/improvements-to-autoplay.aspx| title = Improvements to AutoPlay| publisher = Microsoft| work = Engineering Windows 7 blog}} 5. ^{{Cite web| url = http://support.microsoft.com/kb/971029| title = Update to the AutoPlay functionality in Windows| publisher = Microsoft| work = Knowledge Base}} 6. ^1 {{cite web|url=http://www.csoonline.com/article/2131830/malware-cybercrime/security-researchers-discover-link-between-stuxnet-and-flame.html|title=Security researchers discover link between Stuxnet and Flame|first=Lucian|last=Constantin|publisher=}} 7. ^1 2 {{cite web|url=http://blogs.technet.com/b/srd/archive/2009/09/11/autoplay-windows-7-behavior-backported.aspx|title=AutoPlay Windows 7 behavior backported|publisher=}} 8. ^1 {{cite web|url=http://www.csoonline.com/article/2132598/malware-cybercrime/security-firms-warn-of-spreading-windows-autorun-malware.html|title=Security firms warn of spreading Windows AutoRun malware|first=Antone|last=Gonsalves|publisher=}} 9. ^1 {{cite web|url=https://www.theregister.co.uk/2011/02/08/microsoft_windows_autorun_retirement|title=Microsoft finally says adios to Autorun|publisher=}} }} External links
2 : Configuration files|Windows administration |
随便看 |
|
开放百科全书收录14589846条英语、德语、日语等多语种百科知识,基本涵盖了大多数领域的百科知识,是一部内容自由、开放的电子版国际百科全书。