Devices Enable or Disable AutoPlay for All Drives in Windows 11


  • Staff
AutoPlay_banner.png

AutoPlay lets you choose an action for different kinds of media when you plug in a device or insert media. You can set AutoPlay to open different kinds of content, such as photos, music, and video on different kinds of media, such as drives, CDs, DVDs, cameras, and phones. For example, you can use AutoPlay to select an app that will automatically open photos on a removable drive when you plug it into your PC. With AutoPlay, you don't have to open the same app or reselect preferences every time you plug in a certain device.

When the Shell detects the insertion of new media or the attachment of a hot-plug device, the contents of the device or media are determined. AutoPlay, depending on its current settings, does one of the following.
  • Plays the content automatically.
  • Displays a dialog box prompting the user to choose a default handler for a single content type.
  • Presents, in the case of mixed content, a list of available handler applications to launch. The chosen handler then automatically plays its associated content type.
  • Displays a standard folder view of the files.
  • Does nothing if, earlier, the user had chosen Take no action for that content type as well as specified Always do the selected action. You can turn off AutoPlay for specific media or devices by choosing Take no action as its AutoPlay default.
  • You will only see an AutoPlay notification when you have AutoPlay turned on and connect a device, media, or content that you chose Choose a default (default) or Ask me every time as its AutoPlay default.
  • If you connect a storage device to your PC (for example, a USB flash drive or other external drive), that device won't appear under Devices in AutoPlay. AutoPlay will only show non-storage devices, such as some digital cameras, video cameras, and phones. You can view storage devices in the This PC window in File Explorer.
  • You can press and hold the Shift key when you insert devices or media into your PC to open an AutoPlay notification, regardless of the default setting.
You can use the Turn off AutoPlay group policy to disable AutoPlay for all drives no matter what users have set in AutoPlay for their accounts.

This tutorial will show you how to enable or disable AutoPlay for all drives for all users in Windows 10 and Windows 11.


You must be signed in as an administrator to enable or disable AutoPlay for all drives.

This will not affect AutoPlay for non-volume devices like cameras or phones.

Disabling AutoPlay for all drives will also remove the Open AutoPlay context menu for removable drives.



Contents

  • Option One: Enable or Disable AutoPlay for All Drives in Local Group Policy Editor
  • Option Two: Enable or Disable AutoPlay for All Drives using REG file


EXAMPLE: "Ask me every time" AutoPlay notification

AutoPlay_notification.png






OPTION ONE

Enable or Disable AutoPlay for All Drives in Local Group Policy Editor


The Local Group Policy Editor is only available in the Windows 11 Pro, Enterprise, and Education editions.

All editions can use Option Two.


1 Open the Local Group Policy Editor (gpedit.msc).

2 Navigate to the policy location below in the left pane of the Local Group Policy Editor. (see screenshot below)

Computer Configuration\Administrative Templates\Windows Components\AutoPlay Policies

AutoPlay_for_all_drives_gpedit-1.png

3 In the right pane of AutoPlay Policies in the Local Group Policy Editor, double click/tap on the Turn off AutoPlay policy to edit it. (see screenshot above)

4 Do step 5 (enable) or step 6 (disable) below for what you would like to do.


5 Enable AutoPlay for All Drives

This is the default setting.


A) Select (dot) Not Configured. (see screenshot below)​

B) Click/tap on OK, and go to step 7 below.​

AutoPlay_for_all_drives_gpedit-2.png

6 Disable AutoPlay for All Drives

A) Select (dot) Enabled. (see screenshot below)​

B) Select All drives in the "Turn off AutoPlay on" drop menu under Options. (see screenshot below)​

C) Click/tap on OK, and go to step 7 below.​

AutoPlay_for_all_drives_gpedit-3.png

7 You can now close the Local Group Policy Editor if you like.





OPTION TWO

Enable or Disable AutoPlay for All Drives using REG file


1 Do step 2 (enable) or step 3 (disable) below for what you would like to do.


2 Enable AutoPlay for All Drives

This is the default setting.


A) Click/tap on the Download button below to download the file below, and go to step 4 below.​

Enable_AutoPlay_for_all_drives_for_all_users.reg


(Contents of REG file for reference)
Code:
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer]
"NoDriveTypeAutoRun"=-

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer]
"NoDriveTypeAutoRun"=-

3 Disable AutoPlay for All Drives

A) Click/tap on the Download button below to download the file below, and go to step 4 below.​

Disable_AutoPlay_for_all_drives_for_all_users.reg


(Contents of REG file for reference)
Code:
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer]
"NoDriveTypeAutoRun"=-

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer]
"NoDriveTypeAutoRun"=dword:000000ff

4 Save the .reg file to your desktop.

5 Double click/tap on the downloaded .reg file to merge it.

6 When prompted, click/tap on Run, Yes (UAC), Yes, and OK to approve the merge.

7 You could now delete the downloaded .reg file if you like.


That's it,
Shawn Brink


 

Attachments

  • AutoPlay.png
    AutoPlay.png
    6.9 KB · Views: 41
  • Disable_AutoPlay_for_all_drives_for_all_users.reg
    874 bytes · Views: 100
  • Enable_AutoPlay_for_all_drives_for_all_users.reg
    844 bytes · Views: 123
Last edited:
Top Bottom