ArticleslgStudy

science

Autorun.inf

Autorun.inf is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Autorun.inf rather than just read about it. In short: 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.

Key takeaways

  • Autorun.inf belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Autorun.inf to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Autorun.inf from memory before moving on to harder problems.

Reference excerpt

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 file autorun.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. These keys specify:

The name and the location of a program to call when the medium is inserted (the "AutoRun task"). The name of a file that contains an icon that represents the medium in Explorer (instead of the standard drive icon). Commands for the menu that appears when the user right-clicks the drive icon. The default command that runs when the user double-clicks the drive icon. Settings that alter AutoPlay detection routines or search parameters. Settings that indicate the presence of drivers.

Abuse Autorun.inf has been used to execute a malicious program automatically, without the user knowing. 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.

Inf handling The 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 AutoRun, then the following autorun.inf handling takes place:

Windows versions prior to Windows XP On any drive type, the autorun.inf is read, parsed and instructions followed immediately and silently. The "AutoRun task" is the application specified by the open or shellexecute keys. If an AutoRun task is specified it is executed immediately without user interaction. Windows XP, prior to Service Pack 2 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. Any discovered removable media are handled by AutoPlay. All other handling is as before. XP Service Pack 2 and up (includes Vista) 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 action key. 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 action key to appear as an option within the AutoPlay dialog. Otherwise the AutoRun task is omitted. All other handling is as before. Vista and later 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. Windows 7, Windows 8, Windows 8.1, Windows 10 For all drive types, except DRIVE_CDROM, the only keys available in the [autorun] section are label and icon. Any other keys in this section will be ignored. Thus only CD and DVD media types can specify an AutoRun task or affect double-click and right-click behaviour. There is a patch available, KB971029 for Windows XP and later, that will change AutoRun functionality to this behaviour.

A simple example This 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:

Sections Following are the sections and keys allowed in a valid autorun.inf. 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:

action=text action=@[filepath\]filename,-resourceID

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 open or shellexecute keys. The text is expressed as either text or as a resource reference. The icon is displayed next to the text. This item is always first in the AutoPlay dialog and is always selected by default. 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. icon=iconfilename[,index] 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 open key. label=text Specifies a text label representing the drive in Windows Explorer. open=[exepath\]exefile [param1 [param2 ...]] 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"" shellexecute=[filepath\]filename [param1 [param2 ...]]

… excerpt ends here. Continue reading the full article.

Worked examples

Example 1 — a first encounter with Autorun.inf

Start with the simplest possible case. Write down what Autorun.inf claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Autorun.inf before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Autorun.inf ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Autorun.inf

In research
Autorun.inf appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Autorun.inf in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Autorun.inf is common in secondary-school and first-year university syllabi. It links to neighbouring topics Configuration files, Windows administration, so understanding it makes those chapters shorter.
In everyday life
Look for Autorun.inf outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Autorun.inf” →

How to study Autorun.inf in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Autorun.inf means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Autorun.inf out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Autorun.inf in simple terms?

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.

Why does Autorun.inf matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Autorun.inf?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Autorun.inf.

Tags

  • Configuration files
  • Windows administration

Keep exploring