Windows AutoPlay goes back as far as we can remember, and it's one of those settings many prefer to disable. In Windows 10, you can enable or disable Windows AutoPlay for removable drives, memory cards, smartphones, and more.
Depending on the device, you might see:
Take no action
Open folder to view files
Ask me every time
Configure Storage Settings
Play (list of media players)
We can make the changes in Settings or enable or disable Autoplay with a registry file.
Video tutorial:
How to Turn AutoPlay On or Off in Windows 10 & 11 - Settings
For Windows 10, click on Start > Settings > Devices > AutoPlay. For Windows 11, click on Start > Settings > Devices > Bluetooth & devices > AutoPlay
Check or uncheck Use AutoPlay for all media devices to completly enable, or disable AutoPlay.
Click the dropdown next to any available devices to view and select from a list of available options.
How to Turn AutoPlay On or Off in Windows 10 & 11 - Control Panel
Double-click Turn Off AutoPlay.reg or Turn On AutoPlay.reg (Default) to Turn Windows AutoPlay On or Off.
Click Yes when prompted by User Account Control. Click Yes when prompted by Registry Editor.
Click OK when prompted by the Registry Editor.
Advanced users can go to HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers and change the DisableAutoPlay DWORD to 1 for off, 0 for on.