Windows 7 Classic AutoPlay Dialog Restorer
This mod restores the classic Windows 7 AutoPlay dialog for removable drives and optical media
Author: babamohammed
About
This mod restores the classic Windows 7 AutoPlay dialog when inserting a USB drive, a disc, or a phone.
What is seen is a simple list of real actions (open folder, play with Windows
Media Player, view pictures with Windows Photo Viewer, ReadyBoost). A program
from the disc is offered only if clicked and only if the file is on that
volume.
The "Always do this" choice is remembered by the mod, not by Windows policy.
A privacy setting can hide the volume or device name in this mod only.
Screenshot

Notes
The mod has been tested on Windows 10 21H2 and Windows 11 24H2.
This mod is a best-effort reimplementation using native Windows components.
On some Windows builds or configurations, the drive context-menu/UI-object
hook may fail to install as a safety precaution (e.g. if the relevant
shell32 function pointer cannot be verified). When this happens, the
classic AutoPlay dialog still works, but right-click "AutoPlay" behavior
on drive icons in Explorer may fall back to the native one. Check the
Windhawk debug log for "Drive folder GetUIObjectOf hook" to confirm.
Native AutoPlay is suppressed by intercepting the shell's enumeration of
IQueryCancelAutoPlay CLSIDs under
HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\CancelAutoplay\CLSID
and synthesizing this mod's handler. Nothing is written to that key. Leftover
values from earlier versions of the mod are deleted when the owner instance
starts.