How Regedit Stores Recycle Bin Namespace Extensions
The Windows Registry stores configuration and behavioral data for the
Recycle Bin namespace extension using Class Identifiers (CLSIDs) and
specialized subkeys. By mapping these unique identifiers across keys
such as HKEY_CLASSES_ROOT and
HKEY_LOCAL_MACHINE, the Registry manages how the Windows
Shell renders the Recycle Bin, handles file operations, displays dynamic
icons, and attaches contextual shell extensions.
The Recycle Bin CLSID
In Windows, every Shell namespace extension is represented by a COM (Component Object Model) object identified by a GUID. The default Recycle Bin uses the following CLSID:
{645FF040-5081-101B-9F08-00AA002F954E}
This GUID serves as the primary anchor in the Registry for all settings, behaviors, and handlers associated with the Recycle Bin namespace.
Core Registry Paths
Information about the Recycle Bin namespace extension is organized primarily across two registry locations:
- Class Registration:
HKEY_CLASSES_ROOT\CLSID\{645FF040-5081-101B-9F08-00AA002F954E}(orHKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{645FF040-5081-101B-9F08-00AA002F954E})- This path defines the implementation DLL, capabilities, icons, and shell handlers for the extension.
- Shell Namespace Registration:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace\{645FF040-5081-101B-9F08-00AA002F954E}- This entry registers the CLSID within the desktop namespace hierarchy, ensuring the Recycle Bin appears as a virtual folder on the Desktop and in File Explorer.
Essential Subkeys and Their Roles
Inside the Recycle Bin’s CLSID key, several subkeys control specific behaviors of the namespace extension:
1. InprocServer32
- Path:
...\{645FF040-5081-101B-9F08-00AA002F954E}\InprocServer32 - Purpose: Points to the dynamic-link library (DLL)
responsible for executing the Recycle Bin logic—typically
%SystemRoot%\system32\shell32.dll. - Values: Contains the
(Default)string pointing to the DLL and aThreadingModelstring set toApartment.
2. DefaultIcon
- Path:
...\{645FF040-5081-101B-9F08-00AA002F954E}\DefaultIcon - Purpose: Defines the visual state of the Recycle Bin.
- Values:
(Default): Fallback icon resource path.empty: Path to the icon representing an empty Recycle Bin.full: Path to the icon representing a populated Recycle Bin.
3. ShellFolder
- Path:
...\{645FF040-5081-101B-9F08-00AA002F954E}\ShellFolder - Purpose: Controls namespace flags and capabilities through binary and DWORD attributes.
- Values:
Attributes: A bitmask (such as0x40010020or0x70010020) that dictates whether the virtual folder can be renamed, deleted, searched, or pinned.FolderValueFlags: Flags regulating folder behaviors within the Shell view.
4. shellex (Shell Extensions)
- Path:
...\{645FF040-5081-101B-9F08-00AA002F954E}\shellex - Purpose: Contains subkeys for registered handler
extensions that hook into the Recycle Bin interface:
ContextMenuHandlers: Hooks context menu commands (e.g., “Empty Recycle Bin”).PropertySheetHandlers: Hooks property pages displayed when opening Recycle Bin properties.DragDropHandlers: Manages interactions when files are dragged onto the Recycle Bin icon.
Extension Customization and Overrides
Third-party tools or administrators modify how the Recycle Bin
operates by manipulating these registry keys. For per-user
customizations, configurations are mirrored or overridden under
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\CLSID\{645FF040-5081-101B-9F08-00AA002F954E}
or HKEY_CURRENT_USER\Software\Classes\CLSID\..., allowing
user-level redirection, custom icons, or tailored shell behaviors
without modifying system-wide values.