v0.1.1: GUI auto-elevates, installer handles upgrades cleanly#2
Merged
Conversation
Two fixes for the v0.1.0 install experience: 1. Embed app.manifest with requestedExecutionLevel=requireAdministrator so the GUI always elevates. The named pipe is ACL'd to SYSTEM and the Administrators group, but UAC token splitting puts Admins in deny-only on the standard token, so launching the GUI from the Start Menu fails to connect with "Access is denied". The manifest forces UAC to elevate, surfaces the shield icon on the shortcut, and matches the reality that the GUI cannot function without admin rights. 2. Add a [Code] PrepareToInstall hook to webhook-server.iss that runs `sc stop WebhookServer` before file copy. Upgrade installs were failing on locked binaries because the running service held the exes open. sc returns non-zero on fresh installs (no service yet) which we ignore. Bumps Version to 0.1.1. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
User-facing copy only; internal API names (Backups collection, BackupEntry, list-backups op, etc.) stay the same to avoid churn through the wire protocol and existing on-disk files. The new phrasing makes the auto-snapshot-before-save model more discoverable. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The previous sc.exe stop is fire-and-forget; on slower machines the file-copy step started before the service had actually released its binaries, leaving the upgrade in a broken state. Switch to net.exe stop which blocks until the service reports STOPPED. Also taskkill any running WebhookServer.Gui.exe (the user might have left the tray running) and any orphan WebhookServer.Service.exe (from deploy.ps1 dev runs) so all copies of the binaries are unlocked before [Files] runs. Pre-flight ServiceExists() check via sc query so the installer only calls "net stop" when there is actually a service to stop, rather than relying on net's error code. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
16ce906 to
0217d9f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
net stop WebhookServer(synchronous, blocks until actually stopped) plustaskkill /ffor any running GUI or orphan Service process before file copy. No more manualStop-Servicestep.Test plan
dotnet testpasses (25/25)dotnet build -c ReleasecleanGenerated with Claude Code