# rinrinx2/idm-reset-tool architecture

> Architecture diagram of the GitHub repository rinrinx2/idm-reset-tool, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/rinrinx2/idm-reset-tool
- Repository: https://github.com/rinrinx2/idm-reset-tool

## Overview

IDM Reset Tool is a Windows Forms utility for resetting Internet Download Manager trial-related state. The documented flow is launch the app, run as administrator, and click Reset; the sampled handler checks privileges, stops IDM processes, edits registry state, and reports success or logs failure. Registry operations are combined in Reseter.cs; the excerpts omit some method bodies, so only evidenced calls are mapped.

Main entry points: [`Form1.cs`](https://github.com/rinrinx2/idm-reset-tool/blob/master/Form1.cs) (Reset form), [`SystemTweak.cs`](https://github.com/rinrinx2/idm-reset-tool/blob/master/SystemTweak.cs) (System checks), [`Reseter.cs`](https://github.com/rinrinx2/idm-reset-tool/blob/master/Reseter.cs) (Registry reset), [`Program.cs`](https://github.com/rinrinx2/idm-reset-tool/blob/master/Program.cs) (App startup)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Desktop UI"]
  node_entry["App startup<br/>[Program.cs]"]
  node_form["Reset form<br/>[Form1.cs]"]
  node_design["Form controls<br/>[Form1.Designer.cs]"]
  node_dialogs["Status dialogs<br/>[Form1.cs]"]
end

subgraph group_reset["Reset workflow"]
  node_resetter["Registry reset<br/>[Reseter.cs]"]
  node_logger["Error logging<br/>[LogWriter.cs]"]
end

subgraph group_system["Windows integration"]
  node_tweak["System checks<br/>[SystemTweak.cs]"]
  node_registry[("Windows Registry")]
  node_processes["IDM processes"]
end

node_user(("User"))
node_logfile["ResetBuglog.txt"]

node_user -->|"launches"| node_entry
node_entry -->|"opens"| node_form
node_user -->|"clicks reset"| node_form
node_form -->|"uses controls"| node_design
node_form -->|"checks admin"| node_tweak
node_form -->|"stops processes"| node_tweak
node_tweak -->|"terminates"| node_processes
node_form -->|"invokes reset"| node_resetter
node_resetter -->|"deletes and writes"| node_registry
node_resetter -->|"gets SID"| node_tweak
node_form -->|"shows status"| node_dialogs
node_form -->|"logs errors"| node_logger
node_logger -->|"appends entries"| node_logfile

click node_entry "https://github.com/rinrinx2/idm-reset-tool/blob/master/Program.cs"
click node_form "https://github.com/rinrinx2/idm-reset-tool/blob/master/Form1.cs"
click node_design "https://github.com/rinrinx2/idm-reset-tool/blob/master/Form1.Designer.cs"
click node_resetter "https://github.com/rinrinx2/idm-reset-tool/blob/master/Reseter.cs"
click node_tweak "https://github.com/rinrinx2/idm-reset-tool/blob/master/SystemTweak.cs"
click node_logger "https://github.com/rinrinx2/idm-reset-tool/blob/master/LogWriter.cs"
click node_dialogs "https://github.com/rinrinx2/idm-reset-tool/blob/master/Form1.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_form,node_design,node_dialogs,node_user toneBlue
class node_resetter,node_logger toneAmber
class node_tweak,node_registry,node_processes toneMint
class node_logfile toneIndigo
```

## Components

### Desktop UI

- [App startup](https://github.com/rinrinx2/idm-reset-tool/blob/master/Program.cs): `Program.cs`
- [Reset form](https://github.com/rinrinx2/idm-reset-tool/blob/master/Form1.cs): `Form1.cs`
- [Form controls](https://github.com/rinrinx2/idm-reset-tool/blob/master/Form1.Designer.cs): `Form1.Designer.cs`
- [Status dialogs](https://github.com/rinrinx2/idm-reset-tool/blob/master/Form1.cs): `Form1.cs`

### Reset workflow

- [Registry reset](https://github.com/rinrinx2/idm-reset-tool/blob/master/Reseter.cs): `Reseter.cs`
- [Error logging](https://github.com/rinrinx2/idm-reset-tool/blob/master/LogWriter.cs): `LogWriter.cs`

### Windows integration

- [System checks](https://github.com/rinrinx2/idm-reset-tool/blob/master/SystemTweak.cs): `SystemTweak.cs`
- **Windows Registry**
- **IDM processes**

### Other components

- **User**
- **ResetBuglog.txt**

## Connections

- User → App startup: launches
- App startup → Reset form: opens
- User → Reset form: clicks reset
- Reset form → Form controls: uses controls
- Reset form → System checks: checks admin
- Reset form → System checks: stops processes
- System checks → IDM processes: terminates
- Reset form → Registry reset: invokes reset
- Registry reset → Windows Registry: deletes and writes
- Registry reset → System checks: gets SID
- Reset form → Status dialogs: shows status
- Reset form → Error logging: logs errors
- Error logging → ResetBuglog.txt: appends entries
