How to Disable AutoPlay for USB Drives and Disks in Windows

AutoPlay for USB drives and external disks in Windows can sometimes be inconvenient or even unsafe, especially if you want to protect your system from potential threats on external devices. Disabling this feature gives you more control over when and how devices can access your computer. Here, we’ll go over the steps to disable AutoPlay for USB drives and disks.

Method 1: Disable AutoPlay via Control Panel

  1. Open the Control Panel: Press Win + R, type control, and press Enter.
  2. Go to "Hardware and Sound": Find and select "AutoPlay".
  3. Disable AutoPlay: Uncheck the box next to "Use AutoPlay for all media and devices".
  4. Save your changes: Click "Save" to apply the settings.

AutoPlay is now disabled for all types of devices, and they will no longer automatically open upon connection.

Method 2: Disable AutoPlay via Group Policy Editor

This method is available only for users with Windows Pro or Enterprise versions.

  1. Open the Group Policy Editor: Press Win + R, type gpedit.msc, and press Enter.
  2. Navigate to the required section: In the left pane, expand "Computer Configuration" → "Administrative Templates" → "Windows Components" → "AutoPlay Policies".
  3. Disable AutoPlay: Find "Turn off AutoPlay" and double-click it. Set it to "Enabled" and select "Disable AutoPlay on all drives".
  4. Apply and save changes: Click "OK" to confirm.

Method 3: Disable AutoPlay via Registry Editor

This method is recommended for advanced users, as errors in the registry can affect system stability.

  1. Open the Registry Editor: Press Win + R, type regedit, and press Enter.
  2. Navigate to the appropriate key: Go to HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer.
  3. Create a key to disable AutoPlay: Right-click in the right pane and select "New" → "DWORD (32-bit) Value". Name it NoDriveTypeAutoRun.
  4. Set the key value: Double-click the newly created key and set its value to FF (hexadecimal) to disable AutoPlay on all drives.
  5. Close the editor and restart your computer.