AutoPlay is a feature of Windows that allows the user to set the default action to perform whenever an external storage device, such as a memory card, a smartphone, or an USB hard drive is connected to the computer. In some cases, having File Explorer open automatically when a new drive is detected is useful, but in others, it can be an annoyance. Imagine you are to give a presentation and, while you’ve already started addressing the audience, you notice that your smartphone is running low on battery. You hook it up to your laptop, and BOOM! PowerPoint gets minimized. A minor annoyance, sure, but if there’s a way to prevent it from happening, why not doing something about it?
Disabling AutoPlay entirely
The quickest and easiest way to prevent this from occurring is to disable AutoPlay entirely. Note that this will not prevent external storage devices from automounting and showing up in File Explorer: it just entails that Windows will not do anything after mounting the volume (or volumes).
Open the Settings app
Oh, Settings app, you can’t even imagine how much I love you! To open it, just click the Start button and click the small gear icon above the Power button.
Locate AutoPlay under Devices
Click the tile marked Devices, as shown in the screenshot below.
Next, you’ll need to click on the AutoPlay entry on the left pane. It usually is the second to last.
Switch off AutoPlay
Click the small switch under Use AutoPlay for all media and devices to turn AutoPlay off for all external devices.
Customizing AutoPlay behaviour for each type of device
The method described above works well, but may not be suitable for everyone. For example, you may want File Explorer to mount and open USB thumb drives or hard disks automatically, but not smartphones. The method to do this is similar to what we’ve shown so far; only the last step will be different, so refer to the paragraphs above for the first steps.
Disabling AutoPlay on a smartphone
Instead of switching off Use AutoPlay for all media and devices, locate the entry for your smartphone. In my case, it’s called ONE E1003.
Click the drop-down list and select Take no action.