Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Stop Flash Drives Auto Opening in Windows 10

· 5 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

To stop flash drives from opening automatically in Windows 10, you need to change the AutoPlay settings in the Control Panel or the Settings app. This prevents malware from launching when you plug in a USB drive and stops accidental file access. You don't need any special tools—just a few clicks in the built-in settings.

What You'll Need

  • A Windows 10 PC (any version, Home or Pro)
  • Administrator access (the setting changes apply to your user account, but admin rights can help if settings are locked)

Step-by-Step

  1. Open Windows Settings. Press the Windows key + I on your keyboard. This opens the Settings app directly.
  2. Go to Devices. In the Settings window, click on Devices (the icon looks like a monitor and a keyboard).
  3. Select AutoPlay. In the left sidebar, click AutoPlay. The main pane will show a toggle at the top.
  4. Turn off AutoPlay. Click the toggle under “Use AutoPlay for all media and devices” so it turns Off. This disables automatic opening for all removable drives, including USB flash drives, SD cards, and external hard drives.
  5. Optionally, set specific actions. If you prefer to keep AutoPlay on but change what happens with flash drives, scroll down to the “Removable drives” section. Click the dropdown and select Take no action. This way, nothing opens automatically when you plug in a USB drive, but AutoPlay remains enabled for other media like DVDs or memory cards.
  6. Verify the change. Unplug your flash drive, then plug it back in. Windows should no longer open File Explorer or any other app automatically. If it still opens, repeat the steps and ensure the toggle is off or the dropdown is set to “Take no action.”

Note: The exact wording of menus and options may vary slightly depending on your Windows 10 version, but the path is the same in most recent builds. If you don't see “Devices” in Settings, search for “AutoPlay” in the Start menu and click the matching result.

Common Mistakes

  • Turning off AutoPlay but not changing the dropdown. If you turn off the master toggle, the dropdown options become greyed out, but that's fine. However, if you only change the dropdown to “Take no action” but leave the master toggle on, other media types may still auto-open. Make sure you either turn off the toggle entirely or set the dropdown for removable drives specifically.
  • Forgetting to restart Explorer. Rarely, the change may not take effect until you restart File Explorer or log off and on. If that happens, restart your PC or sign out and back in.
  • Changing the wrong setting. Some users confuse AutoPlay with “Default apps” or “Notifications.” AutoPlay is specifically under Devices > AutoPlay in Settings, or in the Control Panel under “AutoPlay.”

Tips

  • Use Group Policy for stricter control (Pro/Enterprise only). If you have Windows 10 Pro or Enterprise, you can disable AutoPlay for all users via Group Policy. Press Windows key + R, type gpedit.msc, and press Enter. Navigate to Computer Configuration > Administrative Templates > Windows Components > AutoPlay Policies. Double-click “Turn off AutoPlay,” set it to Enabled, and choose “All drives.” This overrides user settings.
  • Scan USB drives before opening. Even with AutoPlay off, it's a good habit to right-click the drive in File Explorer and select “Scan with Windows Defender” (or your antivirus) before browsing files.
  • Keep AutoPlay off for security. Malware can spread via infected USB drives that exploit AutoPlay. Turning it off is a simple, effective security measure.

Troubleshooting

If you've followed the steps and your flash drive still opens automatically, try these in order:

  1. Check if the drive is a CD-ROM or other media. Some USB drives emulate a CD-ROM (e.g., for software installation). AutoPlay for “Removable drives” may not cover those. In the AutoPlay settings, look for “Removable drives” and also check “Memory cards” or “DVD/CD” sections and set them to “Take no action” as well.
  2. Restart your PC. A simple restart often applies the setting.
  3. Check Group Policy. If you have Pro/Enterprise, open gpedit.msc and ensure “Turn off AutoPlay” is not set to “Not Configured” or “Disabled.” If it's Enabled, that's fine—it should block AutoPlay. If it's Disabled, it forces AutoPlay on, overriding your settings. Set it to “Not Configured” or “Enabled” as needed.
  4. Check the registry (advanced). If all else fails, open Registry Editor (type regedit in Start menu). Navigate to HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer. Look for a DWORD value named NoDriveTypeAutoRun. If it exists, set its value to 255 (decimal) to disable AutoRun for all drives. If it doesn't exist, you can create it, but this is an advanced step—make a backup of the registry first.
  5. Update Windows. Ensure your Windows 10 is up to date, as some builds had bugs with AutoPlay settings.

Frequently Asked Questions

Will disabling AutoPlay affect my ability to use USB drives?

No. You can still access the drive manually by opening File Explorer and clicking on the drive letter. AutoPlay only controls automatic actions when you plug in the drive.

Does this stop all USB devices, like keyboards or mice?

No. AutoPlay only affects storage devices (like flash drives, external hard drives) and media (like DVDs). Input devices like keyboards and mice are not affected.

Can I still autorun a specific program from a USB drive after disabling AutoPlay?

No. Disabling AutoPlay prevents any program from running automatically. You can still run programs manually by browsing to the drive and double-clicking the executable file.

Is AutoPlay the same as AutoRun?

AutoRun is the older system that runs a file named autorun.inf on the drive. AutoPlay is the newer feature that prompts you to choose an action. Disabling AutoPlay in Settings also disables AutoRun for removable drives.

Why does my flash drive still open even after I turned off AutoPlay?

This can happen if the drive has a CD-ROM partition (some USB drives are made to look like a CD for installation purposes). Check the AutoPlay settings for “DVD/CD” and set it to “Take no action” as well. Also, verify the setting in the Control Panel (Control Panel > AutoPlay) matches the Settings app.

Does this setting apply to all users on the PC?

No, the Settings app change applies only to your user account. To apply it to all users, you need to use Group Policy (Pro/Enterprise) or edit the registry for each user.