Home/AutoPlay vs AutoRun
AutoPlay vs AutoRun: What Each Windows Setting Does
Two Windows features share a confusing history and nearly identical names. AutoPlay asks what to do when media appears. AutoRun reads a file on the drive and may start a program. Knowing which is which tells you which setting to change and what each one cannot protect against.
AutoPlay is the prompt Windows shows when you plug in a drive, and you control it in Settings under AutoPlay. AutoRun is the older mechanism that follows instructions in autorun.inf, and for USB drives it has been disabled by default since Windows 7. Turn off both for full coverage.
At a glance
| Topic | AutoPlay and AutoRun |
|---|---|
| Applies to | Windows 11, 10 and 7 |
| Short version | Prompt versus instruction file |
| Time needed | 5 minutes to read |
| Cost | Free |
| Last verified | November 2026 |
The Difference in One Table
The two features differ in who decides. With AutoPlay, a person picks an action from a menu. With AutoRun, the drive itself supplies instructions. That distinction explains why autorun malware was dangerous and why a prompt, once tamed, rarely is.
| Question | AutoPlay | AutoRun |
|---|---|---|
| Purpose | Asks what to do with new media | Follows instructions in autorun.inf |
| Where you see it | Pop-up or notification | Nothing, it runs in the background |
| USB drives today | Active unless you turn it off | Commands ignored since Windows 7 |
| Optical discs | Active | Partly honoured |
| Control | Settings, Group Policy, registry | NoAutorun policy and registry value |
| Main risk | Accidental opening | Silent execution |
| Practical advice | Turn it off or set Take no action | Block commands with NoAutorun = 1 |
Which setting does my situation need?
Choose what you want to stop.
AutoPlay. Use the Settings toggle or the Take no action default.
How Windows Changed Autorun Over Time
Microsoft first softened autorun in Windows 7, which stopped offering autorun tasks for non-optical media, then released update KB971029 to bring the change to XP and Vista. After that, drive-to-drive worms lost their easiest route and attackers shifted to disguised shortcuts and device spoofing.
Removable media have stayed a favourite carrier anyway, as the overview of removable storage and its risks explains.
Reading the NoDriveTypeAutoRun Bit Mask
The value NoDriveTypeAutoRun is a bit field where each bit switches AutoPlay off for one drive type. Setting every bit gives 0xFF, which covers all drive types. A smaller mask such as 0x04 covers only removable drives and leaves network and unknown types active.
Putting It Into Practice
Apply both controls and confirm with a read-back. The main guide lists the steps for the Settings toggle, Group Policy and registry, and a PowerShell snippet confirms the values. Together they remove the prompt and block autorun commands without any extra software.
The full procedure is in the main guide under step-by-step methods. Home users should use the registry walkthrough, and offices should read the policy guide.
AutoPlay and AutoRun Questions
Four questions cover the confusion that remains after the comparison: whether the two features are the same, what Windows 11 does today, which setting to change first, and what the bit mask value means in practice.
Is AutoPlay the same as AutoRun?
No. AutoPlay is the menu Windows shows when you connect media, offering to open a folder or play files. AutoRun reads an autorun.inf file on a drive and can start a program named there. Windows treats them as separate features with separate settings.
Does Windows 11 still run autorun.inf from USB drives?
For USB flash drives it does not run the commands automatically. Microsoft changed Windows 7 so AutoPlay stopped offering autorun tasks on non-optical media, and later versions kept that behaviour. Optical discs still honour more of the file, which is why the registry values remain worth setting on a shared PC.
Which setting should I change first?
Start with AutoPlay in Settings, since it is visible, quick and reversible. Then set the machine-wide registry values or policy so the result holds for every account on the PC. Verify the registry values with PowerShell rather than trusting the Settings page alone, because policy does not lock that page.
What does 0xFF mean in NoDriveTypeAutoRun?
It is a bit mask with every drive-type bit set to one, which turns off AutoPlay for all drive types. Smaller values switch off only some types, such as 0x04 for removable drives, which can leave other drive types active.
Where to Go After This Comparison
Each guide in this series owns one question and links to the others for the rest. Pick the next one that matches what you are trying to do, and return to the main guide whenever you need the full overview.