# lesferch/folderthumbnailfix architecture

> Architecture diagram of the GitHub repository lesferch/folderthumbnailfix, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-13). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/lesferch/folderthumbnailfix
- Repository: https://github.com/lesferch/folderthumbnailfix

## Overview

FolderThumbnailFix is a Windows utility for switching Windows 11 folder thumbnails between full-size and default half-covered styles. Users launch its GUI or use `/install` and `/remove`; the utility replaces the mask icon in Windows’ `imageres.dll.mun`, then resets the thumbnail cache and restarts Explorer. The implementation is concentrated in `Program.cs`, so the graph separates its user interface, command entry, patching, and Windows-process work by responsibility rather than implying separate modules. The README documents the main workflow; sampled source confirms cache and Explorer operations, but does not show all dispatch details.

Main entry points: [`Program.cs`](https://github.com/lesferch/folderthumbnailfix/blob/main/Program.cs) (Application entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interaction["User interaction"]
  node_entry["Application entry<br/>[Program.cs]"]
  node_gui["GUI dialogs<br/>[Program.cs]"]
  node_cli["Command options<br/>[Program.cs]"]
end

subgraph group_patching["Icon patching"]
  node_patch["Icon replacement<br/>[Program.cs]"]
  node_resource["Windows resource"]
  node_resourcehacker["Resource Hacker"]
end

subgraph group_windows["Windows refresh"]
  node_cache["Thumbnail cache<br/>[Program.cs]"]
  node_explorer["Explorer process<br/>[Program.cs]"]
end

node_user(("User"))

node_user -->|"launches"| node_entry
node_entry -->|"shows"| node_gui
node_user -->|"selects option"| node_cli
node_entry -->|"handles options"| node_cli
node_entry -->|"applies or removes"| node_patch
node_patch -->|"replaces mask"| node_resource
node_entry -->|"resets"| node_cache
node_entry -->|"kills and restarts"| node_explorer
node_resourcehacker -.->|"supports replacement"| node_patch

click node_entry "https://github.com/lesferch/folderthumbnailfix/blob/main/Program.cs"
click node_gui "https://github.com/lesferch/folderthumbnailfix/blob/main/Program.cs"
click node_cli "https://github.com/lesferch/folderthumbnailfix/blob/main/Program.cs"
click node_patch "https://github.com/lesferch/folderthumbnailfix/blob/main/Program.cs"
click node_cache "https://github.com/lesferch/folderthumbnailfix/blob/main/Program.cs"
click node_explorer "https://github.com/lesferch/folderthumbnailfix/blob/main/Program.cs"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_entry,node_gui,node_cli,node_user toneBlue
class node_patch,node_resource,node_resourcehacker toneAmber
class node_cache,node_explorer toneMint
```

## Components

### User interaction

- [Application entry](https://github.com/lesferch/folderthumbnailfix/blob/main/Program.cs): `Program.cs`
- [GUI dialogs](https://github.com/lesferch/folderthumbnailfix/blob/main/Program.cs): `Program.cs`
- [Command options](https://github.com/lesferch/folderthumbnailfix/blob/main/Program.cs): `Program.cs`

### Icon patching

- [Icon replacement](https://github.com/lesferch/folderthumbnailfix/blob/main/Program.cs): `Program.cs`
- **Windows resource**
- **Resource Hacker**

### Windows refresh

- [Thumbnail cache](https://github.com/lesferch/folderthumbnailfix/blob/main/Program.cs): `Program.cs`
- [Explorer process](https://github.com/lesferch/folderthumbnailfix/blob/main/Program.cs): `Program.cs`

### Other components

- **User**

## Connections

- User → Application entry: launches (evidence: `README.md`)
- Application entry → GUI dialogs: shows (evidence: `README.md`)
- User → Command options: selects option (evidence: `README.md`)
- Application entry → Command options: handles options (evidence: `README.md`)
- Application entry → Icon replacement: applies or removes (evidence: `README.md`)
- Icon replacement → Windows resource: replaces mask (evidence: `README.md`)
- Application entry → Thumbnail cache: resets (evidence: `Program.cs`)
- Application entry → Explorer process: kills and restarts (evidence: `Program.cs`)
- Resource Hacker → Icon replacement: supports replacement (evidence: `README.md`)
