How to disable Autorun/AutoPlay?
Permanent link:
https://auditsquare.com/advisory/windows/how-to-disable-autorun
What are “Autorun” and “Autoplay”?
Autorun allows executable files on a drive to be run automatically when that drive is accessed. The feature works via a file named autorun.inf. When a drive is accessed, Windows checks for the presence of autorun.inf and, if found, follows the instructions contained within that file. What's the difference between AutoPlay and Autorun?
AutoPlay
AutoPlay is a Windows feature that lets you choose which program to use to start different kinds of media, such as music CDs, or CDs and DVDs containing photos. For example, if you have more than one media player installed on your computer, AutoPlay will ask which media player you want to use when you try to play a music CD for the first time. You can change AutoPlay settings for each media type.
Autorun
Autorun is a technology used to automatically start programs or enhanced content (such as video content on a music CD) when you insert a CD or another media type into your computer. This is different from AutoPlay, but the result is often the same: when inserted, the CD starts automatically by using a particular program. Autorun is incorporated into the media types that use it, and you can't modify it. When you try to play a CD or another media type that uses autorun, AutoPlay asks you to choose an action to perform (for example, to play the autorun content or to skip it).
Why is it a security issue?
By default, Autorun launches every time, and makes your system vulnerable to viruses, malwares, trojans etc. Disable the autorun feature to prevent malware from spreading.
How to fix it?
Disabling Autoplay via GUI (Windows XP)
- Open My Computer
- Under Devices with Removable Storage, right-click the device you want disable autoplay and then click Properties
- On the AutoPlay tab, click the multimedia content type you want to change
- Under Actions choose Take no action
Disabling Autoplay via GUI (Windows Vista or Windows 7)
- Click: Start ›› Control Panel ›› AutoPlay
- Clear the Use AutoPlay for all media and devices check box.
- Click Save
Disabling Autorun and Autoplay via Group Policy (not available on Home editions)
- Press
Win+r
(or Start ›› Run) and typeGpedit.msc
+ pressENTER
(If you are prompted for an administrator password or for confirmation, type the password, or click Allow) - Expand: Computer Configuration ›› Administrative Templates ›› Windows Components and then click Autoplay Policies.
- Set the following values:
Turn off Autoplay = Enabled
andDefault behaviour for Autorun = Disabled
Disabling Autorun via registry
BEWARE: it is necessary to disable autorun on 2 places in HKEY_CURRENT_USER
and also in HKEY_LOCAL_MACHINE
- Start
regedit
(as administrator) - go to:
HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer
- Create a new
DWORD
value namedNoDriveTypeAutoRun
and set it to0x000000b5
- Go to:
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer
- Create a new
DWORD
value namedNoDriveTypeAutoRun
and set it to0x000000b5
- Log off/log on or reboot for the change to take effect.
Possible NoDriveTypeAutoRun
values:
Value | Description |
---|---|
0x00000091 |
enable autorun for CD/DVD and floppy/USB disks (Windows XP default) |
0x00000095 |
disable autorun for floppy/USB disks (Windows 2003 default) |
0x000000b1 |
disable autorun for CD/DVD |
0x000000b5 |
disable autorun for CD/DVD and floppy/USB flash disks |
0x000000ff |
disable all available autoruns |