INF file


In computing, an INF file or Setup Information file is a plain-text file used by Microsoft Windows for the installation of software and drivers. INF files are most commonly used for installing device drivers for hardware components. Windows includes the IExpress tool for the creation of INF-based installations. INF files form part of the Windows Setup API and of its successor, Windows Installer.
The \windows\inf directory contains several such .inf files.

Structure

The structure of an INF file is very similar to that of an INI file; it contains various sections that specify the files to be copied, changes to the registry, etc. All INF files contain a section with a Signature key-value pair specifying the version of Windows that the INF file is meant for. The signature is commonly $CHICAGO$ or $WINDOWS NT$. Most of the remaining sections are user-defined and contain information specific to the component being installed.
An example of an INF file might have something like this:

open=example.exe

What this would do is open the example.exe file automatically whenever the media containing the file is connected to the computer. This can be dangerous, as there is no way to tell whether such a file exists before inserting the media. Since Windows XP, however, this feature has been replaced with a menu forcing the user to choose which action to take.
INF Files can sometimes be dangerous on Windows 2000 as they may allow viruses to autorun without prompting.
They are blocked on Windows 7, but can be worked around.

open=example.bat
icon=cd.ico

icon=*.ico command replaces any old or default drive icon with the specified one.
can be replaced by or .