mirror of
https://github.com/jhd3197/ServerKit.git
synced 2026-11-09 21:43:05 +09:00
After pairing, the Windows pairer always ran sc stop/start on ServerKitAgent. On standalone exe installs (no MSI) that service doesn't exist, so sc failed with error 1060 and surfaced as a fake "pairing failed" even though credentials were written fine. Add isServiceInstalled() (sc query; 1060 => not installed) and skip the stop/start dance cleanly when the service isn't registered, in both the pair-code and connection-string flows. Also adds the missing waitForServiceStopped() before start in the connection-string flow (avoids 1056 during STOP_PENDING). go build ./... + vet green (windows). Recovered from a local stash. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>