How Windows 95 Handled CD AutoRun Installations
When Microsoft introduced Windows 95, it transformed software setup from a manual command-line process into an automated experience via the AutoRun feature. This article explains how Windows 95 detected optical media insertion at the hardware and driver level, how it read the root configuration file, and how the operating system shell executed automated setup programs.
Detection via Hardware Polling and Drivers
Windows 95 relied on continuous communication between the CD-ROM
storage subsystem and the Windows shell to detect when a user inserted a
disc. Because legacy ATAPI and proprietary CD-ROM interfaces often
lacked interrupt-driven media-change notifications, the 32-bit
protected-mode CD-ROM file system driver (CDFS.VXD) and the
associated virtual device drivers periodically polled the drive for
state changes.
If the drive hardware supported the Media Status Notification (MSN)
specification, it reported a NOT_READY to
READY transition. Once the operating system confirmed that
a new disc was present and mounted, the file system sent a broad system
message (WM_DEVICECHANGE) notifying the Windows shell
(Explorer) that new media had arrived.
Parsing the
autorun.inf File
Upon receiving the notification, Windows Explorer scanned the root
directory of the newly mounted volume specifically for a plain-text
configuration file named autorun.inf.
This file followed the standard INI file syntax and required an
[autorun] header section. The primary directives used for
software installation included:
open=: Pointed to the executable binary or batch script to launch immediately (for example,open=setup.exeoropen=install.exe /welcome).icon=: Defined the visual icon path to represent the drive in "My Computer" and Windows Explorer, replacing the default optical drive icon.shell\action\command=: Allowed developers to define custom right-click context menu actions in the shell.
If the file did not contain an open= line, or if the
file was missing entirely, the operating system simply mounted the drive
silently without running any program.
Executing the Installer
Once Windows 95 verified the presence of the open=
directive in autorun.inf, Windows Explorer called the Win32
CreateProcess or ShellExecute API to start the
designated program in the context of the currently logged-in user. The
installer ran immediately in the foreground, allowing the setup wizard
to present welcome screens, license agreements, and configuration
options without requiring the user to locate the drive letter or
manually double-click a file.
Bypass and Disabling Mechanisms
To allow users to bypass automatic execution—such as when inserting
an audio CD or running a secondary disc—Microsoft included a built-in
override. Holding down the Shift key while inserting the
disc instructed the shell to ignore the autorun.inf
trigger. Additionally, users and system administrators could disable the
feature permanently through the Windows Registry by altering the
NoDriveTypeAutoRun key or through Device Manager by
unchecking the "Auto insert notification" checkbox under the CD-ROM
drive's properties.