~/projects-hub/projects/windows-icons-admin
Active
Windows Icons Admin icon
WindowsToolsCustomizationWinUI 3
C# 13.NET 9WinUI 3Windows App SDKWin32 P/InvokexUnitInno Setup

Windows Icons Admin

High-performance folder and system icon personalization utility for Windows 10 and 11, featuring an automated rule engine, native multi-resolution PNG-to-ICO encoder, and instant shell refresh.

Last updated:

The Problem

Customizing folder icons in Windows has historically relied on the slow, folder-by-folder system properties sheet or outdated legacy utilities that corrupt existing desktop.ini files, lack reversible undo history, and force full Windows Explorer restarts that destroy taskbar state.

The Solution

A modern Windows desktop application in C# 13 and .NET 9 featuring a Fluent WinUI 3 interface engineered under Cleanroom TDD standards. It integrates an automated rule engine with ReDoS protection, a pure-stream 7-layer PNG-to-ICO encoder, robust desktop.ini injection handling Win32 directory attributes (ReadOnly/System), atomic transactional undo history, and zero-disruption live shell refresh via SHChangeNotify.

Key Learnings

  • Win32 Folder Attribute Shell Gate: Windows Explorer completely ignores desktop.ini unless the directory is flagged with FILE_ATTRIBUTE_READONLY or FILE_ATTRIBUTE_SYSTEM. On folders, this attribute does not lock write permissions and acts solely as an internal shell signal to parse folder customizations.
  • Non-Destructive Shell Refresh: Terminating explorer.exe disrupts taskbar state and running tray apps. Instant live updates are achieved via dual Win32 notifications: SHCNE_UPDATEITEM for path-specific updates paired with SHCNE_ASSOCCHANGED to invalidate the in-memory shell icon cache.
  • GDI+ Silent PNG Truncation Guard: Standard .NET image decoders silently process corrupted PNG streams lacking valid IEND footer chunks. A chunk-level PNG integrity parser was built to prevent generating malformed .ico binaries.
  • Cleanroom TDD Architectural Decoupling: WindowsIconsAdmin.Core was engineered with zero dependencies on UI or platform APIs, enforcing frozen interface contracts and 160 air-gapped unit tests covering ReDoS timeouts, thread-safe undo transactions, and multi-resolution binary encoding.
  • Dual Storage Modality: Architecture supporting both Centralized icon storage in %LOCALAPPDATA% (clean folders without loose assets) and Portable mode directly inside the customized directory (preserving icons across network shares and removable drives).

Folder Icon Automation & Windows Shell Architecture

Windows Icons Admin is a modern desktop personalization utility for Windows 10 and 11 designed to streamline directory and shell visual organization:

  • Automated Rule Engine: Create declarative matching rules (Contains, StartsWith, EndsWith, and regex patterns protected by evaluation timeouts against ReDoS) to automatically assign visual branding to code repos, media libraries, or client directory trees.
  • Pure-Stream Multi-Layer ICO Encoder: In-memory conversion pipeline generating compliant 7-layer .ico binaries (16x16 to 256x256) adhering to Win32 icon requirements with chunk-level PNG integrity validation prior to encoding.
  • Resilient desktop.ini Management: Preserves existing custom configuration keys while automatically managing the Win32 folder attributes (FILE_ATTRIBUTE_READONLY / FILE_ATTRIBUTE_SYSTEM) required by Windows Explorer to recognize folder customizations.

Cleanroom TDD Engineering & Transactional Durability

  • Isolated Domain with Frozen Contracts: The core domain library WindowsIconsAdmin.Core has zero dependencies on UI frameworks or platform APIs. Its interface contracts were formalized up front and verified with 160 air-gapped unit tests executing in sub-seconds.
  • Atomic Undo Store: Persistent transaction log on disk with automated corruption recovery, allowing instant rollback of bulk icon customization operations.
  • Zero-Disruption Shell Invalidation: Dual Win32 shell notifications (SHCNE_UPDATEITEM and SHCNE_ASSOCCHANGED) refresh Explorer icons on the fly without terminating system processes or interrupting active taskbar sessions.

This page is a high-level summary. The GitHub repository is the source of truth for each tool's current features. GitHub ↗