How to Disable AutoPlay for USB Drives in Windows 11

The Security Risk

Windows 11 retains a legacy feature called “AutoPlay.” By default, the moment you plug a USB flash drive or an external hard drive into your computer, Windows immediately scans the drive. It will automatically pop up a menu asking what you want to do, and in some configurations, it will attempt to automatically open the folder or launch an installer file found on the drive. This is a massive security vulnerability. If you plug in a corrupted or maliciously infected USB drive, AutoPlay can inadvertently execute a virus before your antivirus software even has a chance to scan the drive. You must permanently disable this automated behavior.

How to Turn Off AutoPlay

You can completely sever the automatic USB scanning engine via the system settings.

  1. Click the Start Menu and type Settings, or press the Windows Key + I.
  2. In the left-hand sidebar, click on Bluetooth & devices.
  3. In the main window, scroll down and click on AutoPlay.
  4. Look at the very top of the screen for the master toggle switch labeled “Use AutoPlay for all media and devices.”
  5. Toggle this switch to the Off position.

Manual Drive Mounting

The change takes effect instantly. From this point forward, when you plug a USB flash drive or insert an SD card into your computer, Windows 11 will simply mount the drive silently in the background. It will not scan the files, it will not pop up a menu, and it will not attempt to run any software. To access your files, you must intentionally open the File Explorer and manually click on the USB drive, ensuring you are always in complete control of your hardware.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.