Opt-in login startup

App identity and the owned registry value

WhatValue
KeyHKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run
Value nameElevenClockRust (REG_SZ)
Value data"<absolute path to elevenclock-rs.exe>" --startup; in managed mode "<folder>\elevenclock-rs-launcher.exe" --startup (see below)
Windows’ own flagHKCU\...\Explorer\StartupApproved\Run, value ElevenClockRust (read; deleted when the user turns startup on or off here)

The legacy ElevenClock writes elevenClock to the same key. Registry value names are case-insensitive, so the Rust app’s name differs by more than case (startup::tests::value_name_never_collides_with_the_legacy_app). Nothing else is ever written, deleted or read for writing: no HKLM, no service, no scheduled task, no UAC. --startup is the runtime’s private launch marker (instance::STARTUP_MARKER): it starts the clock quietly, never opens Settings, and does nothing when an instance is already running (the existing per-user mutex).

Managed mode: the launcher is the registered program

When elevenclock-rs-launcher.exe sits in the app’s own folder, the copy is managed (ADR 0004). The Startup option is unchanged: it is still the user’s choice, still off by default, and still only the ElevenClockRust value. Only the registered program differs:

What the user gets

Settings → Startup:

Startup page

ControlBehaviour
Start ElevenClock-rs when I sign in to Windows (Alt+S)The registration itself. Off by default. Acts immediately (it is OS state, not a draft: Apply, Cancel and Reset to defaults never touch it). After every action the page is rewritten from what the registry holds, so the box can only show the truth
Startup status (read-only text)One of the states below, in words
Repair startup entry (Alt+R)Enabled only when the entry is stale; re-points it at this executable
Result line“ElevenClock-rs will start when you sign in to Windows.”, “…will no longer start…”, or the failure and “Startup was not turned on/off.” Raises a screen-reader alert like the other status lines

The page is read again whenever it is opened (also with Ctrl+PageDown), because Task Manager and Windows Settings can change the registration while Settings is open.

States

StateRegistryCheckboxWords
Offno valueclear“does not start when you sign in”
Onexact quoted command for this executable, not switched off in Windowschecked“starts when you sign in”
Switched off in Windowssame, but the StartupApproved flag is offclear“Windows has it turned off. Select the checkbox to turn it back on, or use Windows Settings, Apps, Startup.” Selecting the box deletes only this value’s flag
Stale: moved or deletedquoted path that no longer exists (a portable copy was moved)checked, Repair enablednames the old path; “Choose Repair startup entry … or clear the checkbox to remove the entry”
Stale: another copypath that exists but is not this executablechecked, Repair enablednames the other copy
Stale: unrecognisedunquoted path, other arguments, not textchecked, Repair enabled“not one ElevenClock-rs recognises”
Registry unreadableread errordisabledthe Windows reason; never reported as “off”

A stale or moved entry is never rewritten silently: launching the app, opening the page and unticking the box all leave it alone; only the Repair button (or ticking the box when it is clear) writes. Startup is never enabled on the user’s behalf.

Rules implemented (clock-windows::startup, tested on any host)

Installer cooperation and uninstall contract

Known limits