Fix Google Drive Desktop Icon Refresh
Prevents Google Drive for Desktop from periodically refreshing Windows desktop icons and resetting the icon cache.
Author: osmanonurkoc
Motivation: Stopping the Icon Flicker
Google Drive for Desktop (GoogleDriveFS.exe) has a recurring quirk on Windows 11 where it periodically triggers system-wide Explorer shell refreshes every 30–40 seconds, causing desktop icons to flicker and reload—even when Desktop or User folders are not synced and Stream mode is used.
Common workarounds such as blocking drivefsext.dll shell extensions or locking HKCU registry permissions either fail to stop the refresh loop or break Drive's context menu (such as the "Available offline" toggle). This mod stops the refresh directly at the source.
How it Works
Instead of modifying the Windows Registry or disabling shell extensions, this mod intercepts the Win32 Shell notification API that forces Explorer to redraw the desktop:
- Targeted Injection: Injects exclusively into
GoogleDriveFS.exe, leaving explorer.exe and all other system processes untouched.
- API Hooking: Resolves
SHChangeNotify from shell32.dll and installs a lightweight hook via Windhawk.
- Configurable Filtering: Inspects the
wEventId bitmask on every call against a live atomic mask controlled by the mod's settings. Enabled flags (SHCNE_ASSOCCHANGED and/or SHCNE_UPDATEIMAGE) are stripped; if no other event flags remain, the call is dropped, while all other shell notifications pass through normally.
Key Features
- Stops Desktop Flickering: Eliminates the periodic 30–40 second desktop icon refresh loop.
- Live Toggleable Filters: Enable or disable
SHCNE_ASSOCCHANGED and SHCNE_UPDATEIMAGE filtering individually from the Settings tab without restarting Google Drive.
- Non-Destructive: Requires no registry hacks, ACL locks, or shell extension blocking.
- Full Drive Functionality: Preserves Google Drive context menus ("Available offline"), virtual drive access, and sync status overlay badges.
- Zero Explorer Overhead: Hooks only
GoogleDriveFS.exe, keeping explorer.exe clean.
Compatibility
- Works on Windows 10 and Windows 11 (x86, x64, and ARM64).
- Tested with Google Drive for Desktop in Stream mode (with or without offline folders).
Limitations
- Icon Association Updates: While
SHCNE_ASSOCCHANGED and SHCNE_UPDATEIMAGE calls from GoogleDriveFS.exe are suppressed, icon updates for Google file types (.gdoc, .gsheet, etc.) after a major Drive update may require restarting Explorer or temporarily toggling the settings off.
- Scope: Only intercepts notifications originating from
GoogleDriveFS.exe. Icon refreshes caused by other cloud clients or third-party shell extensions are not affected.