You have probably noticed that, every time you plug-in a new media, like a flash drive, CD or DVD in your computer an AutoPlay window appears showing you a list of general options, specific for each type of media or device. You can choose any of these options or set a default action to be run automatically each time you insert that type of media. In this tutorial I will show how to work with the AutoPlay feature and customize it to have the behavior you desire.
Where to Find AutoPlay Panel
There are different ways of getting to the AutoPlay control window. Open Control Panel, choose Hardware and Sound and then AutoPlay.

The second way is to type autoplay in the search box in Start Menu and choose AutoPlay.

This is the AutoPlay settings window. From here you can choose whether or not you want to use this feature and select the default actions for a series of media and devices.

Customizing AutoPlay Options
In the AutoPlay window, you can select whether you want to use this feature for all media or devices, by clicking the box ‘Use AutoPlay for all media and devices’.

The AutoPlay window provides a list of all supported media types and devices. For each of them you have a series of options from which you can select the default action. To see the list of options, click the drop-down box on the right side of the media type or device you are interested in.

For example, setting up AutoPlay for an Audio CD, means choosing the action that your computer will take when you insert such a CD. Click on the drop-down box on the right-hand side of Audio CD, see all the available actions and choose the one you prefer.

If you pick ’Ask me every time’, a window like the one below will appear each time you insert an Audio CD. If you want to set an option as default, select ’Always do this for audio CDs’.

If your choice is ’Play audio CD using Windows Media Player’ then, when you insert an Audio CD, Windows Media Player will open and start playing your CD.
Also, if later on you install other programs which work with the same media or devices and add a new AutoPlay option, the next time you insert such a media/device, you will be prompted that new options are available. You can keep your current choice or you can pick a new default option.

UPDATE:If you want to add custom entries to the AutoPlay menu, check out this tutorial: Customize File Types, AutoPlay & Default Programs Settings with Default Programs Editor.
Conclusion
As you can see the AutoPlay feature is very useful and easy to use. Configuring its behavior takes just a few seconds. If you have any questions about it, let us know using the comments form below.