w features in Windows have as colored a history as AutoPlay. In its early days, the setting was infamous for passing viruses from errant USB drives to PCs. In more recent versions of Windows, AutoPlay is off by default to prevent malicious files from automatically executing on a PC.
AutoPlay is handy because it tells Windows to automatically carry out a specific action when you plug in some kind of removable media such as an SD card, a USB drive, or an external CD player. AutoPlay can be set to automatically import photos or videos, play any media, open File Explorer, or do nothing at all.
Even in the age of Windows 10, the best practice for AutoPlay is to leave it off or to have it ask you what to do every time you insert a device. If that doesn’t work for you, the next most benign step you can take is to set AutoPlay to open File Explorer. That way you can still see what’s on the USB stick, which is probably an action you would’ve taken anyway.
Here’s how it works in Windows 10. This example uses the Anniversary Update, but previous iterations offer similar settings.
Go to Start > Settings > Devices > AutoPlay. At the very top of the main screen there’s an On/Off slider that activates or deactivates AutoPlay. Below that is the subheading Choose AutoPlay defaults.
This section may change depending on your machine’s configuration. On my laptop I have options to decide what to do with a USB removable drive (flash drive, external hard drive, etc.) and a memory card.
In our example, we’re setting each option to open the files in File Explorer for immediate viewing. To do that, select each drop-down menu and choose Open folder to view files (File Explorer). If you’d rather open File Explorer yourself, choose the Take no action option.
If you need more granular control over what AutoPlay does with each type of removable media, you’ll find that in the Control Panel. Open the utility by right-clicking on Start and then selecting Control Panel from the context menu.
Next, set the View by option in the control panel to Large icons. Then select AutoPlay at the top of the window. From here you can tell Windows to do specific things based on the type of media and the files it has.
For example, you can tell a removable drive to automatically import photos but take no action for videos. There are numerous options you can set using Control Panel, but again it’s important to understand that using AutoPlay at all can be an easy way to end up with an infected PC.
Of course, there’s more to USB security than just disabling AutoPlay. Check out Stack Exchange for a short discussion about threats from external media beyond using AutoPlay. The most important thing to know is that you should never plug a USB device into your computer if you don’t trust it or don’t know where it came from.
Even if you do trust a USB device (such as one that you own), you still may not be able to treat it as safe, depending on where it’s been. If you used a personal USB drive at work and then brought it home to insert in your personal machine, watch out. You never know what kinds of horrible things are lurking in corporate networks, your local internet cafe, or even your friend’s house.