How Windows 98 Managed CD-ROM AutoRun

Windows 98 handled CD-ROM autorun functionality through a coordinated pipeline involving hardware polling, shell-level event triggers, and configuration parsing via the AUTORUN.INF file. This article details the underlying architecture of the AutoRun feature in Windows 98, explaining how the operating system detected disc insertion, launched designated software, distinguished data from audio media, and allowed users to manage or bypass automatic execution.

Hardware Polling and Media Insertion Detection

Windows 98 relied on a mechanism called Auto Insert Notification (AIN) to detect when a disc entered the CD-ROM drive. Operating via 32-bit protected-mode drivers (such as CDFS.VXD), the operating system periodically polled the optical drive using low-level ATAPI or SCSI command sets—specifically sending test commands to check for media status changes.

When the drive detected a newly loaded tray, it reported a media change to the driver. The storage subsystem then notified the Windows Shell (Explorer.exe) that new media was mounted and ready to be read.

Reading and Executing AUTORUN.INF

Once the Shell received confirmation that a data disc was present, it read the root directory of the CD-ROM for a file named AUTORUN.INF. This file is an INI-formatted text file that instructed the operating system on how to treat the disc.

A standard AUTORUN.INF file typically contained an [AutoRun] section with two key directives:

  • open: Specified the path to the executable or batch file to run immediately (for example, open=setup.exe).
  • icon: Defined the custom icon file that Windows Explorer would display for that specific drive instead of the default CD-ROM drive icon.

If the file was present and structured correctly, the Shell invoked the ShellExecute API to automatically launch the defined program. It also applied any defined context-menu commands to the drive's right-click menu within My Computer.

AutoRun vs. AutoPlay

Windows 98 maintained a functional distinction between AutoRun and AutoPlay:

  • AutoRun applied strictly to data discs containing an AUTORUN.INF file. It was designed primarily for software installations, multimedia encyclopedias, and games.
  • AutoPlay handled discs lacking an AUTORUN.INF file, specifically Red Book audio CDs. If audio tracks were detected on a disc without autorun instructions, Windows 98 bypassed the software execution routine and automatically passed the disc to the default audio handler, typically launching the native Windows CD Player (cdplayer.exe).

Disabling and Bypassing AutoRun

Because automatic execution could disrupt workflows or cause stability issues on resource-constrained systems, Windows 98 included both temporary and permanent ways to override the feature.

Users could temporarily suppress AutoRun by holding down the Shift key while closing the drive tray or inserting the media until the drive finished spinning up.

Permanently, users could disable the feature through the GUI:

  1. Open the System control panel and select the Device Manager tab.
  2. Expand the CDROM category and open the drive's properties.
  3. Select the Settings tab and uncheck the Auto insert notification option.

Unchecking this setting halted the low-level polling, preventing Windows 98 from detecting media arrival until the user manually accessed the drive in My Computer. Advanced users could also modify system behavior across all drives by altering the NoDriveTypeAutoRun binary value in the Windows Registry under HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer.