AutoPlay is a useful feature of Windows that automatically executes when you connect external media or devices such as USB drives, memory cards, or DVDs. Depending on the type of content detected, AutoPlay can open File Explorer, launch a media player, or prompt an input dialog. Although it is quite convenient, many people do not like AutoPlay because of security concerns. In this guide, you will learn a few ways to enable or disable AutoPlay in Windows 11.
Enable or disable Windows 11 AutoPlay via Settings
Open Settings on your computer, then click on Bluetooth & devices and then click on AutoPlay next to it.

Then turn off AutoPlay at Use AutoPlay for all media and devices .

In the Choose AutoPlay defaults section , select actions for Removable drive and Memory card .

Turn on, turn off AutoPlay Windows 11 via Control Panel
Step 1:
Open Control Panel on your computer and click on Small icons or Large icons .

Now you click on AutoPlay to adjust this mode on the computer.

Step 2:
Switch to the new interface and turn off Use AutoPlay for all media and devices if you don't want to use AutoPlay on Windows 11.

How to enable and disable AutoPlay via Group Policy
Step 1:
Open the Run dialog box and click gpedit.msc to access Group Policy.

Step 2:
Now you access the link below.
Computer Configuration > Administrative Templates > Windows Components > AutoPlay Policies

Step 3:
Look to the side and double click on the Turn off AutoPlay value .

To display the new interface, select Enabled and then click All drives at Turn off AutoPlay on to turn off autoplay on all drives or select CD-ROM and removable media drives to turn off autoplay on these media.
