Files
clash-verge-rev/src-tauri/packages/windows
TungliesandCopilot a236ee61b0 feat(windows): reinstall an existing Service during NSIS upgrades
The reinstall page runs the previous uninstaller, which removes the
Service, and the new installer only tried to start one. Record whether
clash_verge_service exists, with its start type and running state, in
.onInit before that uninstaller can run. When it existed, Section Install
reinstalls it with the bundled cores and their hashes through the
installer's own elevation, then restores a non-automatic start type and
the stopped state. A first install still never adds a Service.

A failed reinstall or restore is logged, shown in a warning dialog that is
auto-confirmed under /S, and sets exit code 2, so the installer does not
report success.

Validated only by compiling the macros with makensis -WX against the real
SimpleSC plugin; not run on Windows.

Refs #8553

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-11-09 21:22:48 +08:00
..