AutoRun is a feature of the Windows operating system that causes predetermined system actions when certain media is inserted. Common media types that trigger AutoRun actions include CDs, DVDs in traditional or Blu-ray format and USB storage devices, such as flash drives or external hard drives.Content Continues Below
AutoRun originally appeared as a means of launching scripted startup actions automatically. When the system recognizes new media and finds an autorun.inf file, the system will attempt to follow any instructions contained within that INF file.
For example, the autorun.inf file is typically used to launch a setup or installer program to install a new application on the system.
If there is no autorun.inf file available on the newly inserted media, Windows will typically default to an AutoPlay mode, prompting the user to perform an action, such as view files, play videos, open images or see pictures using the default application defined for each file type. For example, a user might choose to view files -- such as the documents on the flash drive -- using Windows Explorer or watch a DVD using the Windows Media Player, and so on.
Windows Registry Editor
It is possible to disable AutoRun, if necessary, by making changes to the Windows Registry using a tool such as the Windows Registry Editor, and then add NoDriveTypeAutorun entries to the HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer key for each drive type to be disabled, such as removable, fixed, network and other drive types. If the key doesn't exist, it must be created. However, making registry changes can pose serious risks to a computer's stability; registry edits should be avoided wherever possible -- or performed only by experienced computer technicians.
Instead of editing the registry, it is often preferable to adjust AutoPlay and tailor the responses for each media type, or simply disable AutoPlay outright. In Windows 10, click Start>Settings>Devices>AutoPlay, and then move the AutoPlay pill switch from on to off. This will disable AutoPlay for all media and devices. You can also enable AutoPlay again later by moving the switch from off to on. Users can also change AutoPlay default actions for removable drives, such as flash drives, memory cards and other storage devices.
Group Policy Editor
Administrators can use the Group Policy editor to disable AutoPlay under the Computer Configuration>Administrative Templates>Windows Components>AutoPlay Policies menu.
AutoRun also refers to a Windows behavior that runs applications during system startup, though unwanted startup entries can usually be removed from the Windows Startup folder.
In Mac computers, the equivalent of AutoRun is called AutoStart, and users can tailor responses to CDs and DVDs through the System Preferences dialog. For example, users can set iTunes to launch when an audio CD is inserted.