How GIMP Installs 32-Bit and 64-Bit Shell Extensions
The GIMP installer ensures native thumbnail previews for XCF image files in Windows Explorer by deploying architecture-specific Component Object Model (COM) shell extensions. On modern 64-bit systems, Windows Explorer operates as a 64-bit process, yet 32-bit applications still require 32-bit handlers to display previews inside their file-picker dialogs. To provide complete system integration, the GIMP setup executable detects the host environment, installs the appropriate 32-bit and 64-bit Dynamic Link Libraries (DLLs), and registers them simultaneously in their respective Windows registry hives.
Architecture Detection and File Placement
GIMP distributes its official Windows package using an Inno Setup
script. During installation, the script checks the target system’s
architecture using built-in system queries such as
IsWin64.
Depending on the detected operating system, the installer extracts the thumbnail handler DLLs to the appropriate system or application subdirectories:
- On 32-bit Windows: The installer extracts only the 32-bit extension binary.
- On 64-bit Windows: The installer extracts both the native 64-bit DLL and the 32-bit fallback DLL. This ensures that native 64-bit Explorer processes and 32-bit processes running under the WOW64 (Windows 32-bit on Windows 64-bit) subsystem can both access a compatible shell extension.
COM Registration and Registry Architecture
Shell extensions for Windows Explorer implement interfaces such as
IThumbnailProvider or legacy interfaces like
IExtractImage. Windows requires these interfaces to be
registered as COM servers associated with the .xcf file
extension.
To register both bit depths on a 64-bit machine, the installer
invokes COM self-registration (DllRegisterServer) or writes
directly to specific registry branches:
- 64-bit Explorer Registration: The 64-bit DLL is
registered in the standard 64-bit registry path under
HKEY_CLASSES_ROOT\CLSIDand mapped to.xcfunderShellEx\{e357fccd-a995-4576-b01f-234630154e96}(the GUID forIThumbnailProvider). This allows Windows Explorer and other 64-bit programs to generate and display thumbnails. - 32-bit Compatibility Registration: The 32-bit DLL
is registered into the
WOW6432Noderegistry hive (HKEY_CLASSES_ROOT\WOW6432Node\CLSID). This guarantees that when a legacy or 32-bit program opens a standard Windows "Open" or "Save As" file dialog, the 32-bit COM host can resolve and execute the 32-bit thumbnail provider.
Uninstallation and Cleanup
When GIMP is uninstalled, the Inno Setup uninstaller reverses the
process. It invokes DllUnregisterServer on both the 32-bit
and 64-bit binaries (or manually purges their associated CLSID keys from
both the native and WOW64 registry trees). This prevents orphaned COM
registrations and prevents Explorer process crashes that can occur when
the shell attempts to call a removed thumbnail handler.