A simple, small calculator placed discreetly near the Windows Taskbar or anywhere on the screen
0

Configure Feed

Select the types of activity you want to include in your feed.

docs: design for classic Inno Setup installer + startup Run-key fallback

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

Marco Maroni (Jul 14, 2026, 4:28 PM +0200) 9a8b6a25 b8a98644

+70
+70
docs/superpowers/specs/2026-07-14-classic-installer-design.md
··· 1 + # Classic Inno Setup Installer + Startup Fallback — Design 2 + 3 + **Date:** 2026-07-14 4 + **Status:** Approved (brainstorming) 5 + 6 + ## Goal 7 + 8 + Distribute TaskbarCalculator from the project's own website 9 + (`https://taskbar-calculator.marcomaroni.it/`) as a classic, **unsigned**, **per-user** 10 + self-installing setup built with **Inno Setup**, while keeping the Microsoft Store (MSIX) 11 + path open for later. Unsigned means users see the usual SmartScreen "unknown publisher" 12 + prompt — acceptable for now (the previous public installer was also unsigned). 13 + 14 + ## Part 1 — Start-at-login fallback in `StartupManager` 15 + 16 + The tray "Start at login" toggle currently uses the MSIX `StartupTask` WinRT API, which 17 + requires package identity. In a classic (unpackaged) install it returns `Unavailable` and 18 + the menu item is grayed. Add a **registry fallback** so the same binary works both ways. 19 + 20 + - Key: `HKCU\Software\Microsoft\Windows\CurrentVersion\Run`, value name `TaskbarCalculator`, 21 + data = the quoted full path of the running exe (`GetModuleFileNameW`). 22 + - `Get()`: try `StartupTask` (packaged/Store); on exception, return `Enabled`/`Disabled` 23 + based on whether the `Run` value exists. 24 + - `Set(on)`: try `StartupTask`; on exception, create/delete the `Run` value. 25 + 26 + Effect: identical exe supports both channels — `StartupTask` on the Store, `Run` key with 27 + the classic installer. In the classic install the menu item becomes **enabled and 28 + functional**. `State::Unavailable` is effectively no longer returned (kept in the enum as a 29 + safety value). 30 + 31 + ## Part 2 — Inno Setup script 32 + 33 + New file `Packaging/TaskbarCalculatorSetup.iss` producing `TaskbarCalculatorSetup.exe`. 34 + 35 + - **Per-user:** `PrivilegesRequired=lowest`, `DefaultDirName={autopf}\TaskbarCalculator` 36 + (resolves to `%LocalAppData%\Programs\TaskbarCalculator`); no UAC. 37 + - **Metadata:** x64 only, icon `icon1.ico`, version `3.0.0`, publisher "Marco Maroni", 38 + URL `https://taskbar-calculator.marcomaroni.it/`. 39 + - **Files:** `x64\Release\TaskbarCalculator.exe` → `{app}`. 40 + - **Icons:** Start-menu shortcut + Uninstall entry. No desktop icon. 41 + - **[Tasks]:** `startup` — checkbox "Avvia Taskbar Calculator all'accesso a Windows", 42 + **preselected** (default checked). When selected, an install-time `[Registry]` entry 43 + writes the `Run` value. 44 + - **[Run]:** postinstall checkbox "Avvia Taskbar Calculator" (runs the app after setup). 45 + - **Running-instance handling:** `taskkill /im TaskbarCalculator.exe /f` in 46 + `PrepareToInstall` (for upgrades over a running instance) and on uninstall. 47 + - **Clean uninstall:** `[Code] CurUninstallStepChanged` always deletes the `Run` value 48 + (whether written by the installer or by the app's tray toggle), so nothing is orphaned. 49 + 50 + ## Build / tooling 51 + 52 + - Compiling `.iss` requires **Inno Setup's `ISCC.exe`** (free). If not installed, the script 53 + is delivered as-is and the compile step is done once Inno Setup is present. 54 + - `Packaging/*.exe` (the generated `TaskbarCalculatorSetup.exe`) is git-ignored. 55 + 56 + ## Testing 57 + 58 + - **StartupManager fallback (runtime):** unpackaged, `Set(true)` creates the `Run` value, 59 + `Set(false)` removes it, `Get()` reflects the state. Verified by a temporary exit-code 60 + harness + registry inspection (as used for the Settings/Startup checks). 61 + - **Inno script:** compile with `ISCC.exe` to validate; the produced 62 + `TaskbarCalculatorSetup.exe` is smoke-tested by the user (per-user install, Start-menu 63 + shortcut, autostart checkbox, run-after-install, uninstall removes app + Run value). 64 + 65 + ## Out of scope (YAGNI) 66 + 67 + - Code signing (unsigned for now; SmartScreen prompt accepted). 68 + - Per-machine install / desktop shortcut. 69 + - Auto-update mechanism (the site hosts the latest `setup.exe`). 70 + - Microsoft Store submission (kept open as a future path; no work now).