AutoPlay, a feature introduced in Windows 98, examines newly discovered removable media and devices and, based on content such as pictures, music or video files, launches an appropriate application to play or display the content.
It can be configured by the user to associate favourite applications with AutoPlay events and actions.
When a user inserts a CD-ROM into a drives or attaches a USB camera, Windows detects the arrival and starts a process of examining the device or searching the medium.
It is looking for properties of the device or content on the medium so that AutoPlay can present a set of meaningful options to the user.
AutoPlay has determined that content is most likely a DVD movie and presents a set of actions to the user based on that decision.
Here the dialog shows the Handlers available if AutoPlay ever determines the content type on drive D: to be "Pictures".
As Windows cannot examine the files on the device to determine content type, it is left to the manufacturer to decide how to proceed.
As these type of devices do not have a drive letter, AutoPlay properties cannot be accessed and changed through "My Computer".
However, when a device is attached, the discovery causes Windows to place an icon in the taskbar notification area (commonly referred to as the tray).
The adjacent image shows the icon that appeared when a video camera was attached.
On a new installation of Windows, a default set of handler applications are registered with the AutoPlay system.
The fact that the check for Audio CDs and Movie DVDs is done before AutoRun has implications for disabling the automatic playing of these types of media.
Disabling AutoRun via the Registry or Group Policy or looking for QueryCancelAutoPlay messages within an application does not prevent these media types from automatically playing on insertion.
[6] However one can disable Audio CDs by editing the file type for AudioCD and clicking "Set default".
Alternatively, changing the (Default) entry under the HKEY_CLASSES_ROOT\AudioCD\Shell key to "" (a blank string) will accomplish the same thing.
Under Windows XP, the existence of this file may affect the process flow – AutoRun can proceed to executing an application directly without user intervention.
Under Windows Vista, AutoRun cannot bypass AutoPlay in this way; it can only add to the options presented to the user.
The Inf handling section of the AutoRun article details when and whether AutoPlay is invoked.
AutoPlay decides whether the volume is an Audio CD, movie DVD, a blank recordable medium (a CD-R, CD-RW, DVD+R etc.)
As far as AutoPlay sniffing is concerned, files fall into three main categories or "content types".
In this case AutoPlay opens an Explorer window on the root directory of the medium and the process flow finishes here.
In the case of volume-based events, the EventHandlers are generated completely internally to AutoPlay with no reference to the Registry.
Note that examination of the AutoPlayHandlers section of the Windows Registry reveals the ContentTypeSniffers and ContentTypeHandlers keys.
However, as of Windows XP SP2, these keys are defined solely for future use and are not accessed by AutoPlay.