Devices Enable or Disable AutoPlay for All Drives in Windows 11

  • Thread starter Thread starter Brink
  • Start date Published: Start date Updated Updated:

AutoPlay2_banner.png

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

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.


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 10/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

Last edited:
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.

I'm dealing with the issue described in this Tutorial. Just tried the Shift trick and I must say it didn't work for me.
 

My Computers

System One System Two

  • OS
    Win 11 Pro 24H2 (26100.4484)
    Computer type
    Laptop
    Manufacturer/Model
    This laptop is an HP 840
    CPU
    i7-1360p 2.20 GHz
    Motherboard
    HP Model 8B41 KBC Version 51.40.00
    Memory
    32 GB
    Graphics Card(s)
    Intel® Iris® Xe Graphics
    Sound Card
    Realtek High Definition Audio; Intel® Smart Sound Technology for Bluetooth® Audio; Intel® Smart Sound Technology for USB Audio Intel® Smart Sound Technology for Digital Microphones
    Monitor(s) Displays
    as outfitted
    Screen Resolution
    1920 x 1200 (as recommended)
    Hard Drives
    (1) one SSD 1TB; (2) external Samsung Portable SSD T7 Shield 4 TB
    Case
    N/A
    Cooling
    as outfitted
    Keyboard
    integrated
    Mouse
    integrated touchpad
    Internet Speed
    800MB/sec up & down
    Browser
    Chrome
    Antivirus
    Malwarebytes
    Other Info
    Device name REC-840
    Processor 13th Gen Intel(R) Core(TM) i7-1360P 2.20 GHz
    Installed RAM 32.0 GB (31.6 GB usable)
    Product ID 00355-61334-62672-AAOEM
    System type 64-bit operating system, x64-based processor
    Pen and touch Touch support with 10 touch points
  • Operating System
    Win 11 Pro 24H2 (26100.4484)
    Computer type
    PC/Desktop
    Manufacturer/Model
    HP Elite Tower 800 G9 Desktop PC (7E5P9AV)
    CPU
    Intel i7 (14th generation)
    Motherboard
    8AC1 KBC Version 12.03.39
    Memory
    64 GB
    Graphics card(s)
    (1) Intel UHD Graphics 770 (integrated); (2) Intel Arc B580 graphics card
    Sound Card
    Topping E30 II DAC Preamp Audio Decoder running @ 384.0 kHz
    Monitor(s) Displays
    ASUS ProArt Display PA279CV
    Screen Resolution
    3840 x 2160
    Hard Drives
    (1) Samsung SSD 990 PRO with Heatsink 2TB; (2) internal HHD CT2000BX500SSD1 2 TB; (3) external Samsung Portable SSD T7 Shield 4 TB
    Case
    HP Elite Tower 800
    Cooling
    As God dictates the room temperature
    Keyboard
    HHKB Lite 2
    Mouse
    Microsoft wheel mouse
    Internet Speed
    800MB/sec up & down
    Browser
    Chrome
    Antivirus
    Malwarebytes
    Other Info
    BIOS U01 Ver. 02.18.10
Is it not possible to do the same just by setting autoplay to "off" in settings? Under Bluetooth and devices.
 

My Computer

System One

  • OS
    Windows 11
    Computer type
    Laptop
    Manufacturer/Model
    HP Pavilion 14-ce3514sa
    CPU
    Core i5
    Memory
    16gb
    Hard Drives
    Samsung 970 evo plus 2TB
    Cooling
    Could be better
    Internet Speed
    200mbps Starlink
    Browser
    Firefox
    Other Info
    Originally installed with a 500gb H10 Optane ssd
Is it not possible to do the same just by setting autoplay to "off" in settings? Under Bluetooth and devices.

Hello, :alien:

Sure, you can turn on/off AutoPlay that way like in the tutorial below.


The disable options in this tutorial prevent being able to turn on AutoPlay instead.
 

My Computers

System One System Two

  • OS
    Windows 11 Pro for Workstations
    Computer type
    PC/Desktop
    Manufacturer/Model
    Custom self build
    CPU
    Intel i7-8700K 5 GHz
    Motherboard
    ASUS ROG Maximus XI Formula Z390
    Memory
    64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz (F4-3600C18D-32GTZR)
    Graphics Card(s)
    ASUS ROG-STRIX-GTX1080TI-O11G-GAMING (11GB GDDR5X)
    Sound Card
    Integrated Digital Audio (S/PDIF)
    Monitor(s) Displays
    2 x Samsung Odyssey G75 27"
    Screen Resolution
    2560x1440
    Hard Drives
    1TB Samsung 990 PRO M.2,
    4TB Samsung 990 PRO M.2,
    8TB WD MyCloudEX2Ultra NAS
    PSU
    Seasonic Prime Titanium 850W
    Case
    Thermaltake Core P3 wall mounted
    Cooling
    Corsair Hydro H115i
    Keyboard
    Logitech wireless K800
    Mouse
    Logitech MX Master 3
    Internet Speed
    1 Gbps Download and 35 Mbps Upload
    Browser
    Chrome and Edge
    Antivirus
    Microsoft Defender
    Other Info
    Logitech Z625 speaker system,
    Logitech BRIO 4K Pro webcam,
    HP Color LaserJet Pro MFP M477fdn,
    CyberPower CP1500PFCLCD
    Galaxy S23 Plus phone
  • Operating System
    Windows 11 Pro
    Computer type
    Laptop
    Manufacturer/Model
    Surface Laptop 7 Copilot+ PC
    CPU
    Snapdragon X Elite (12 core) 3.42 GHz
    Memory
    16 GB LPDDR5x-7467 MHz
    Monitor(s) Displays
    15" HDR
    Screen Resolution
    2496 x 1664
    Hard Drives
    1 TB SSD
    Internet Speed
    Wi-Fi 7 and Bluetooth 5.4
    Browser
    Chrome and Edge
    Antivirus
    Microsoft Defender
Thank you. I'm still a little confused. If it's turned off in settings, does it need turning off in group policy editor as well? And will that stop autorun on usb sticks? Thank you.
 

My Computer

System One

  • OS
    Windows 11
    Computer type
    Laptop
    Manufacturer/Model
    HP Pavilion 14-ce3514sa
    CPU
    Core i5
    Memory
    16gb
    Hard Drives
    Samsung 970 evo plus 2TB
    Cooling
    Could be better
    Internet Speed
    200mbps Starlink
    Browser
    Firefox
    Other Info
    Originally installed with a 500gb H10 Optane ssd
Thank you. I'm still a little confused. If it's turned off in settings, does it need turning off in group policy editor as well? And will that stop autorun on usb sticks? Thank you.

Correct. Think of turning it off the same as turning off a light switch. The group policy method is like turning off the breaker with a lock on it, preventing the light switch from working.

In the end, both will stop AutoPlay from working. AutoRun is a part of the AutoPlay feature, but AutoRun has been disabled since sometime in W7 for security reasons.
 

My Computers

System One System Two

  • OS
    Windows 11 Pro for Workstations
    Computer type
    PC/Desktop
    Manufacturer/Model
    Custom self build
    CPU
    Intel i7-8700K 5 GHz
    Motherboard
    ASUS ROG Maximus XI Formula Z390
    Memory
    64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz (F4-3600C18D-32GTZR)
    Graphics Card(s)
    ASUS ROG-STRIX-GTX1080TI-O11G-GAMING (11GB GDDR5X)
    Sound Card
    Integrated Digital Audio (S/PDIF)
    Monitor(s) Displays
    2 x Samsung Odyssey G75 27"
    Screen Resolution
    2560x1440
    Hard Drives
    1TB Samsung 990 PRO M.2,
    4TB Samsung 990 PRO M.2,
    8TB WD MyCloudEX2Ultra NAS
    PSU
    Seasonic Prime Titanium 850W
    Case
    Thermaltake Core P3 wall mounted
    Cooling
    Corsair Hydro H115i
    Keyboard
    Logitech wireless K800
    Mouse
    Logitech MX Master 3
    Internet Speed
    1 Gbps Download and 35 Mbps Upload
    Browser
    Chrome and Edge
    Antivirus
    Microsoft Defender
    Other Info
    Logitech Z625 speaker system,
    Logitech BRIO 4K Pro webcam,
    HP Color LaserJet Pro MFP M477fdn,
    CyberPower CP1500PFCLCD
    Galaxy S23 Plus phone
  • Operating System
    Windows 11 Pro
    Computer type
    Laptop
    Manufacturer/Model
    Surface Laptop 7 Copilot+ PC
    CPU
    Snapdragon X Elite (12 core) 3.42 GHz
    Memory
    16 GB LPDDR5x-7467 MHz
    Monitor(s) Displays
    15" HDR
    Screen Resolution
    2496 x 1664
    Hard Drives
    1 TB SSD
    Internet Speed
    Wi-Fi 7 and Bluetooth 5.4
    Browser
    Chrome and Edge
    Antivirus
    Microsoft Defender
Thank you. I do get confused about autoplay and autorun as well as I thought the usb sticks still had autorun? So the group policy edit will stop anything on the .inf file in a usb stick as well?
 

My Computer

System One

  • OS
    Windows 11
    Computer type
    Laptop
    Manufacturer/Model
    HP Pavilion 14-ce3514sa
    CPU
    Core i5
    Memory
    16gb
    Hard Drives
    Samsung 970 evo plus 2TB
    Cooling
    Could be better
    Internet Speed
    200mbps Starlink
    Browser
    Firefox
    Other Info
    Originally installed with a 500gb H10 Optane ssd
Thank you. I do get confused about autoplay and autorun as well as I thought the usb sticks still had autorun? So the group policy edit will stop anything on the .inf file in a usb stick as well?

No worries, AutoRun.ini has been hard disabled since W7 for better security.


 

My Computers

System One System Two

  • OS
    Windows 11 Pro for Workstations
    Computer type
    PC/Desktop
    Manufacturer/Model
    Custom self build
    CPU
    Intel i7-8700K 5 GHz
    Motherboard
    ASUS ROG Maximus XI Formula Z390
    Memory
    64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz (F4-3600C18D-32GTZR)
    Graphics Card(s)
    ASUS ROG-STRIX-GTX1080TI-O11G-GAMING (11GB GDDR5X)
    Sound Card
    Integrated Digital Audio (S/PDIF)
    Monitor(s) Displays
    2 x Samsung Odyssey G75 27"
    Screen Resolution
    2560x1440
    Hard Drives
    1TB Samsung 990 PRO M.2,
    4TB Samsung 990 PRO M.2,
    8TB WD MyCloudEX2Ultra NAS
    PSU
    Seasonic Prime Titanium 850W
    Case
    Thermaltake Core P3 wall mounted
    Cooling
    Corsair Hydro H115i
    Keyboard
    Logitech wireless K800
    Mouse
    Logitech MX Master 3
    Internet Speed
    1 Gbps Download and 35 Mbps Upload
    Browser
    Chrome and Edge
    Antivirus
    Microsoft Defender
    Other Info
    Logitech Z625 speaker system,
    Logitech BRIO 4K Pro webcam,
    HP Color LaserJet Pro MFP M477fdn,
    CyberPower CP1500PFCLCD
    Galaxy S23 Plus phone
  • Operating System
    Windows 11 Pro
    Computer type
    Laptop
    Manufacturer/Model
    Surface Laptop 7 Copilot+ PC
    CPU
    Snapdragon X Elite (12 core) 3.42 GHz
    Memory
    16 GB LPDDR5x-7467 MHz
    Monitor(s) Displays
    15" HDR
    Screen Resolution
    2496 x 1664
    Hard Drives
    1 TB SSD
    Internet Speed
    Wi-Fi 7 and Bluetooth 5.4
    Browser
    Chrome and Edge
    Antivirus
    Microsoft Defender
Thank you. So it's my usb sticks I want to do something about. ie something to do with the .inf file and malware can hide in it and jump on the computer when the usb stick is inserted.
 

My Computer

System One

  • OS
    Windows 11
    Computer type
    Laptop
    Manufacturer/Model
    HP Pavilion 14-ce3514sa
    CPU
    Core i5
    Memory
    16gb
    Hard Drives
    Samsung 970 evo plus 2TB
    Cooling
    Could be better
    Internet Speed
    200mbps Starlink
    Browser
    Firefox
    Other Info
    Originally installed with a 500gb H10 Optane ssd
Thank you. So it's my usb sticks I want to do something about. ie something to do with the .inf file and malware can hide in it and jump on the computer when the usb stick is inserted.

AutuRun.ini files no longer work on USBs, so nothing else needed to do for that unless you just wanted to also turn off or disable AutoPlay.

A good AV program that monitors and scans removable drives will help. Microsoft Defenders does, but you do need to enable for a full manual scan below if wanted.

 

My Computers

System One System Two

  • OS
    Windows 11 Pro for Workstations
    Computer type
    PC/Desktop
    Manufacturer/Model
    Custom self build
    CPU
    Intel i7-8700K 5 GHz
    Motherboard
    ASUS ROG Maximus XI Formula Z390
    Memory
    64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz (F4-3600C18D-32GTZR)
    Graphics Card(s)
    ASUS ROG-STRIX-GTX1080TI-O11G-GAMING (11GB GDDR5X)
    Sound Card
    Integrated Digital Audio (S/PDIF)
    Monitor(s) Displays
    2 x Samsung Odyssey G75 27"
    Screen Resolution
    2560x1440
    Hard Drives
    1TB Samsung 990 PRO M.2,
    4TB Samsung 990 PRO M.2,
    8TB WD MyCloudEX2Ultra NAS
    PSU
    Seasonic Prime Titanium 850W
    Case
    Thermaltake Core P3 wall mounted
    Cooling
    Corsair Hydro H115i
    Keyboard
    Logitech wireless K800
    Mouse
    Logitech MX Master 3
    Internet Speed
    1 Gbps Download and 35 Mbps Upload
    Browser
    Chrome and Edge
    Antivirus
    Microsoft Defender
    Other Info
    Logitech Z625 speaker system,
    Logitech BRIO 4K Pro webcam,
    HP Color LaserJet Pro MFP M477fdn,
    CyberPower CP1500PFCLCD
    Galaxy S23 Plus phone
  • Operating System
    Windows 11 Pro
    Computer type
    Laptop
    Manufacturer/Model
    Surface Laptop 7 Copilot+ PC
    CPU
    Snapdragon X Elite (12 core) 3.42 GHz
    Memory
    16 GB LPDDR5x-7467 MHz
    Monitor(s) Displays
    15" HDR
    Screen Resolution
    2496 x 1664
    Hard Drives
    1 TB SSD
    Internet Speed
    Wi-Fi 7 and Bluetooth 5.4
    Browser
    Chrome and Edge
    Antivirus
    Microsoft Defender
Thank you, this has been driving me nuts for a few months now that my external drives wouldnt auto open, your reg file fixed my issue, many thnaks
 

My Computer

System One

  • OS
    11
    Computer type
    PC/Desktop
    Manufacturer/Model
    dell
    CPU
    Intel I7 8700
    Memory
    32gb DDR4
    Graphics Card(s)
    Nvidia 1060
    Monitor(s) Displays
    Asus 28" 4k
    Screen Resolution
    3840 x 2160
    Hard Drives
    1tb Samsung 970 evo plus......
    Internet Speed
    gigabit
    Browser
    Edge
    Antivirus
    Bitdender
Thank you, this has been driving me nuts for a few months now that my external drives wouldnt auto open, your reg file fixed my issue, many thnaks

Glad it could help. :shawn:
 

My Computers

System One System Two

  • OS
    Windows 11 Pro for Workstations
    Computer type
    PC/Desktop
    Manufacturer/Model
    Custom self build
    CPU
    Intel i7-8700K 5 GHz
    Motherboard
    ASUS ROG Maximus XI Formula Z390
    Memory
    64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz (F4-3600C18D-32GTZR)
    Graphics Card(s)
    ASUS ROG-STRIX-GTX1080TI-O11G-GAMING (11GB GDDR5X)
    Sound Card
    Integrated Digital Audio (S/PDIF)
    Monitor(s) Displays
    2 x Samsung Odyssey G75 27"
    Screen Resolution
    2560x1440
    Hard Drives
    1TB Samsung 990 PRO M.2,
    4TB Samsung 990 PRO M.2,
    8TB WD MyCloudEX2Ultra NAS
    PSU
    Seasonic Prime Titanium 850W
    Case
    Thermaltake Core P3 wall mounted
    Cooling
    Corsair Hydro H115i
    Keyboard
    Logitech wireless K800
    Mouse
    Logitech MX Master 3
    Internet Speed
    1 Gbps Download and 35 Mbps Upload
    Browser
    Chrome and Edge
    Antivirus
    Microsoft Defender
    Other Info
    Logitech Z625 speaker system,
    Logitech BRIO 4K Pro webcam,
    HP Color LaserJet Pro MFP M477fdn,
    CyberPower CP1500PFCLCD
    Galaxy S23 Plus phone
  • Operating System
    Windows 11 Pro
    Computer type
    Laptop
    Manufacturer/Model
    Surface Laptop 7 Copilot+ PC
    CPU
    Snapdragon X Elite (12 core) 3.42 GHz
    Memory
    16 GB LPDDR5x-7467 MHz
    Monitor(s) Displays
    15" HDR
    Screen Resolution
    2496 x 1664
    Hard Drives
    1 TB SSD
    Internet Speed
    Wi-Fi 7 and Bluetooth 5.4
    Browser
    Chrome and Edge
    Antivirus
    Microsoft Defender

Latest Support Threads

Back
Top Bottom