AutoPlay (also known as AutoRun) is a feature that automatically runs a program or opens a file on a removable drive or CD/DVD after connecting/inserting it. Most automation tasks are specified in a file named autorun.inf.
AutoPlay is a convenient feature, but it also means that viruses and malware make heavy use of such automation by launching or installing programs without you ever noticing it. That's why most security-aware people tend to disable it completely.
In addition to executing actions specified in autorun.inf files, Windows asks what to do next after you insert a movie disc (Video DVD, Video CD, etc) or an audio disc.
Windows XP and Vista users should first apply an update that prevents launching programs automatically from removable and network drives (links are provided later in the article). If Windows Update is properly configured, the patch should already be applied.
Windows 7, 8 and 8.1 have the feature disabled by default.
If you want to quickly disable AutoPlay for all drives, restore AutoPlay defaults, disable or enable autorun.inf blocking, use the ControlAutoRun program on my other site, help.artaro.eu.
This small tool is especially useful for Windows XP users.
In Windows XP, you must set autorun preferences for each CD/DVD drive and removable drive separately.
That is, unless you have applied Microsoft's optional update from February, 2011 that disables autorun for everything except CD and DVD drives. This update is meant to stop wide-spread malware attacks that misuse USB and network drives.
You can download the KB971029 update for Windows XP here.
To configure AutoRun/AutoPlay for devices manually, open Windows Explorer (press Windows Key+E on your keyboard) and right-click your CD/DVD drive or a removable drive. Then click Properties.
Next, click AutoPlay tab. If you open properties for a fixed or network drive, there is no such tab.
In the first combo box there are several media types available - Music files, Pictures, Video files, Mixed content, Music CD, DVD movie, HD DVD movie, etc.
You must select an AutoPlay action for all types available for each and every CD/DVD drive and removable drive. This is tedious, but it pays off in enhancing security. Or just use free ControlAutoRun to disable AutoPlay quickly.
If you want to be asked for an action every time you insert a CD, DVD or a removable drive, select Prompt me each time to choose an action for each content type. For example, if you insert a DVD movie you will be asked whether you want to play the movie with Windows Media Player, open the contents of the DVD in Windows Explorer, or do nothing.
To prevent automatic questions after inserting a disc or a removable drive, click to select the Select an action to perform option and then click Take no action for each content type.
You can also select some automatic action for DVD or CD movies (for example, Play using Windows Media Player).
Always select either Take no action or Open folder to view files using Windows Explorer for Mixed content in Windows XP!
After setting actions for all content types, click OK button.
Windows Vista users should first apply Microsoft's optional update from February, 2011 that disables autorun for everything except CD and DVD drives. This update is meant to stop wide-spread malware attacks that misuse USB and network drives.
You can download the KB971029 update for 32-bit (x86) Windows Vista here.
You can download the KB971029 update for 64-bit (x64) Windows Vista here.
To configure AutoPlay in Windows Vista or 7, open Start menu by clicking Start button or pressing Windows Key on your keyboard. Type "autoplay" in Search box and click Autoplay.
In Windows 8, open Settings search using keyboard shortcut Windows Key+W, type "autoplay" in Search box and click AutoPlay.
In Windows 8.1, there are both the traditional Control Panel version (click the more colorful AutoPlay for this) and a simplified Modern UI app (click AutoPlay settings, or any other item with cogwheel icon) available.
The new Windows 8.1 Modern UI PC Settings app only allows turning AutoPlay completely off with the Use AutoPlay for all media and devices slider; or selecting actions for removable drives and memory cards. Please note that Windows Explorer has been renamed to File Explorer since Windows 8.
The Control Panel configuration for AutoRun look almost the same since Windows Vista, except that Windows 8 and 8.1 group items by device type and have two additional sections: Removable drive and Memory card.
To disable AutoPlay/AutoRun completely in Windows Vista, 7, 8 and 8.1, clear the Use AutoPlay for all media and devices check box. Click Save to close the window.
If you do not want to be that restrictive about automatic actions, use the following configuration instead. First, make sure the Use AutoPlay for all media and devices check box is turned on.
Then select Take no action for the following items:
- Blank CD,
- Blank DVD,
- Blank BD.
This disables AutoPlay popups in case you insert a blank disc or connect an external or removable device such as USB flash drives or external hard drives with some of the listed content on them.
If you want multimedia files from optical discs (CD/DVD/Blu-ray) to start playing automatically, select your favorite programs for all types of non-blank audio and video/movie discs.
In Windows Vista and 7, set Mixed content, Pictures, Video files and Audio files to Open folder to view files using Windows Explorer to prevent potentially malicious multimedia files from trying to take over your PC. Yes, malware can be embedded into photo, music and video files and it can misuse security bugs in software that plays multimedia files.
In Windows 8 and 8.1, also set Removable device and Memory card to Open folder to view file (File Explorer) to prevent malware from starting automatically.
Then select your preferred action for Software and games. To prevent potential malware from running automatically, I recommend just opening the folder or taking no action at all - you can launch installed games from Start menu or Start screen, and install software using Windows/File Explorer (just double-click the CD/DVD drive and automatic actions run).
Here's an example of non-restrictive, but still secure AutoPlay configuration in Windows 7:
There are also AutoPlay actions available for several types of devices - digital photo and video cameras, smartphones, etc. You should set these to Take no action or to view device contents with Windows/File Explorer.
Click Save to apply changes.