How to Disable AutoRun and AutoPlay for External Devices

AutoRun leaves your computer vulnerable to malware

  • Disable AutoRun: In Windows Registry, create a new DWORD named NoDriveTypeAutoRun. Select a value.
  • Disable AutoPlay in Windows 10: Go to Start > Settings > Devices > turn off AutoPlay.
  • Disable AutoPlay in 8, 8.1: Start > Apps > Windows System. Open Control Panel > Autoplay. Select options.

This article explains how to disable AutoRun in Windows by editing the Windows Registry and how to disable AutoPlay in Windows 10, 8.1 and 8.

Disable AutoRun in Windows

The Windows AutoRun feature enables programs to run from external devices as soon as the device is attached to your computer. Because malware can exploit AutoRun, many users disable it. There's no interface setting to turn off AutoRun completely. Instead, you edit the Windows Registry.

  1. Press Win+R and type regedit to launch the Registry Editor. You must confirm elevated privileges to modify registry settings.

  2. Go to the key:

    HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer
    Windows registry editor
  3. If the entry NoDriveTypeAutoRun does not appear, create a new DWORD value by right-clicking in the right pane to access the context menu and selecting New DWORD (32-bit) Value.

  4. Name the DWORD NoDriveTypeAutoRun, and set its value to one of the following:

    • FF to disable AutoRun on all drives.
    • 20 to disable AutoRun on CD-ROM drives.
    • 4 to disable AutoRun on removable drives.
    • 8 to disable AutoRun on fixed drives.
    • 10 to disable AutoRun on network drives.
    • 40 to disable AutoRun on RAM disks.
    • 1 to disable AutoRun on unknown drives.
    Windows registry

To turn AutoRun back on, delete the DWORD NoDriveTypeAutoRun value.

Disable AutoPlay in Windows 

AutoPlay is a Windows feature that's part of AutoRun. AutoPlay prompts you to play music and videos or display pictures. You can disable AutoPlay in a few steps, but the process depends on your Windows version.

Windows 10

  1. Select the Start icon in the lower-left corner, then select the Settings icon in the left pane.

    Windows 10 - selecting Start > Settings
  2. Select Devices.

    Windows 10, selecting Settings > Devices
  3. Select AutoPlay from the left pane, then select the AutoPlay toggle to turn it Off.

    Windows 10 - Turning AutoPlay off

Windows 8

In Windows 8 and 8.1:

  1. On the Start screen, select Apps > Windows System.

  2. Open the Control Panel and select AutoPlay.

  3. In the Choose what happens when you insert each type of media or device section, select the option you want. For example, you can choose different options for pictures or videos. To completely disable AutoPlay, deselect the Use AutoPlay for all media and devices box.

Was this page helpful?