fix(setup): handle install-folder services, startup entries, shared shortcuts and data

- Windows services whose program lies in the install folder (Titano.Server
  --install-service) are found in the registry and, through the Service
  Control Manager, stopped before files are replaced (they join the
  "programs running" prompt), started again after an upgrade that stopped
  them, deleted when an upgrade drops their program and on uninstall. An
  unelevated setup runs that step in an elevated copy (/SERVICES=...).
- The Server component installs for all users only (manifest allUsersOnly):
  choosing it moves a new install to Program Files and disables "Just me"
  with the reason; a per-user install cannot take it.
- Uninstall removes every HKCU Run value that starts a program in the folder
  (the Uploader's "Start with Windows").
- A shortcut that already starts an existing program elsewhere is neither
  retargeted nor logged, and a logged shortcut is deleted only while it
  still starts a program of this folder, so the two products no longer
  remove each other's "Titano Uploader" shortcuts.
- "Remove my data" lists and deletes only the data of this product's
  programs that no other installed Titano product uses (the desktop app and
  the Uploader share %LOCALAPPDATA%\Titano and its logs folder).
- The .titano file type is named in setup's language (Setup.FileType.*).

Setup tests run in Titano.App.Tests on Windows CI.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
This commit is contained in:
Claude committed 2026-10-12 10:29:16 +00:00
1 parent 81f10379c8
commit 4f6bbfba5d
32 files changed
+1175 -88

No files matched your search

+4 -2
View File
@@ -41,13 +41,15 @@ for community review. Development happens elsewhere; please use the issues here
`Get-FileHash .\Titano-Setup-<version>.exe -Algorithm SHA256` and compare the value with the line for that file
in `SHA256SUMS` of the same release.
3. Run the setup. It installs for the current user into `%LOCALAPPDATA%\Programs\Titano` without administrator
rights; choose *All users* to install into `Program Files` (Windows asks for permission).
rights; choose *All users* to install into `Program Files` (Windows asks for permission). The *Server* component
runs as a Windows service, so choosing it installs for all users.
- **Upgrade:** Titano checks this repository at start (you can turn this off in Settings › Updates) and shows a notice
when a new version exists. *Download* fetches the setup, verifies it against `SHA256SUMS` and shows it in Explorer;
run it to upgrade in place. Your archive, settings and index are kept.
- **Uninstall:** Windows Settings › Apps › Installed apps › Titano › Uninstall. Your photos and archive are never
touched; the program data folder (`%LOCALAPPDATA%\Titano`) is removed only if you tick the option to do so.
touched; the program data in `%LOCALAPPDATA%\Titano` is removed only if you tick the option to do so, and only the
part no other installed Titano program still uses. A Titano Server service of that folder is stopped and removed.
- **Silent install** (IT deployment): `Titano-Setup-<version>.exe /S [/DIR="D:\Apps\Titano"] [/ALLUSERS]
[/COMPONENTS=Titano,Uploader,Server] [/NODESKTOP] [/NOSTARTMENU] [/LANG=it]`. Silent uninstall:
`"%LOCALAPPDATA%\Programs\Titano\Uninstall Titano.exe" /uninstall /S`.