Disable AutoRun/AutoPlay

AutoRun leaves your computer vulnerable to malware

The Windows 10 Desktop
The Windows 10 (Anniversary Update) desktop.


The Windows AutoRun feature is turned on by default on most Windows versions, allowing programs to run from an external device as soon as it is attached to a computer.

Because malware can exploit the AutoRun feature — spreading its unfortunate payload from your external device to your PC — many users choose to disable it. 

AutoPlay is a Windows feature that is part of AutoRun. It prompts the user to play music and videos or display pictures. AutoRun, on the other hand, is a broader setting that controls the actions to take when a USB drive or CD/DVD is inserted into a drive on your computer.

Disabling AutoRun in Windows

There is no interface setting to turn off AutoRun completely. Instead, you have to edit the Windows Registry.

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

  2. Go to the key:  

    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
    • – to disable AutoRun on removable drives
    • – to disable AutoRun on fixed drives
    • 10 – to disable AutoRun on network drives
    • 40 – to disable AutoRun on RAM disks
    • – to disable AutoRun on unknown drives
    Windows registry

To turn AutoRun back on in the future, just delete the NoDriveTypeAutoRun value.

Disabling AutoPlay in Windows 

Disabling AutoPlay is easy, but the process depends on your operating system.

Windows 10

AutoPlay settings

Open the Settings app and click Devices, then select AutoPlay from the left sidebar. Move the button Use AutoPlay for all media and devices button to the Off position.

Windows 8

In Windows 8 and 8.1:

  1. Open the Control Panel by searching for it from the Start screen.

  2. Select AutoPlay from the Control Panel entries.

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

Was this page helpful?