Skip to content
EntityQ684554· pop 12· linked from 8 articles

Autorun.inf

Sign in to save

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.

Described at

Autorun.inf Entries - Win32 apps | Microsoft Learn

This topic is a reference for the entries that can be used in an Autorun.inf file. An entry consists of a key and a value.

docs.microsoft.com

Text that is used in the Autoplay dialog for the handler representing the program specified in the open or shellexecute entry in the media's Autorun.inf file. A string that contains the fully qualified path of the directory that contains the binary file containing the string. If no path is specified, the file must be in the drive's root directory. The string displayed in the Autoplay dialog is constructed by combining the text specified in the action entry with hard-coded text naming the provider, provided by the Shell. The icon is displayed next to it. This entry always appears as the first option in the Autoplay dialog and is selected by default. If the user accepts the option, the application specified by the open or shellexecute entry in the media's Autorun.inf file is launched. The Always do the selected action option is not available in this situation. The action and icon keys together define the representation of the application that is seen by the end user in the Autoplay dialog. They should be composed in such a way that users can easily identify them. They should indicate the application to be run, the company that created it, and any associated branding. For backward compatibility, the action entry is optional for devices of type DRIVE FIXED. For this type, a default entry is used in the Autoplay dialog if no action entry is present in the Autorun.inf file. The action entry is mandatory for devices of type DRIVE REMOVABLE, which until now did not have Autorun.inf support. If no action entry is present, the Autoplay dialog is displayed but with no option to launch the additional content. A text string containing the name of the AutoPlay content event. The name must be no more than 100 alphanumeric characters. You can include a custom event name in the Autorun.inf file of a volume. When AutoPlay prompts the user for an application to use with the volume, it displays only applications that have registered for the specified custom event name. For information on how you can register an application as a handler for your custom AutoPlay content event, see Auto-launching with AutoPlay) or How to Register an Event Handler . The following example specifies the value "MyContentOnArrival" as a new AutoPlay content event. The icon entry specifies an icon which represents the AutoRun-enabled drive in the Windows user interface. Name of an .ico, .bmp, .exe, or .dll file containing the icon information. If a file contains more than one icon, you must also specify zero-based index of the icon. The icon, together with the label, represents the AutoRun-enabled drive in the Windows user interface. For instance, in Windows Explorer, the drive is represented by this icon instead of the standard drive icon. The icon's file must be in the same directory as the file specified by the open command. The label entry specifies a text label which represents the AutoRun-enabled drive in the Windows user interface. The label, together with an icon, represents the AutoRun-enabled drive in the Windows user interface. The following example specifies the value "My Drive Label" as the drive's label. The open entry specifies the path and file name of the application that AutoRun launches when a user inserts a disc in the drive. On Windows Vista and later, this entry causes any actions specified for AutoRun (by using either the open or shellexecute entries) to be suppressed from the AutoPlay dialog. This entry has no effect on versions of Windows earlier than Windows XP. AutoRun is typically used to automatically run or load something contained on the inserted media, whereas AutoPlay presents a dialog that includes a list of relevant actions that may be taken and enables the user to choose which action to take. For more information about the difference between AutoRun and AutoPlay, see Creating an AutoRun-enabled CD-ROM Application and Using and Configuring AutoPlay , respectively. First, consider an Autorun.inf file with the following c

Excerpt from a page describing this subject · 25,792 chars · not written by Vinony

~11 min read

Encyclopedic overview

13 sections
Contents
  • The autorun.inf file
  • Abuse
  • Inf handling
  • A simple example
  • Sections
  • <code>{{bracket|autorun}}</code>
  • <code>{{bracket|Content}}</code>
  • <code>{{bracket|ExclusiveContentPaths}}</code>
  • <code>{{bracket|IgnoreContentPaths}}</code>
  • <code>{{bracket|DeviceInstall}}</code>
  • See also
  • References
  • External links

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.

Excerpted from Wikipedia’s “Autorun.inf” article, available under the CC BY-SA 4.0 licence.