fix(windows): use VBScript launcher to avoid lingering cmd window at logon#1
Merged
Merged
Conversation
…logon The previous install dropped a .cmd into the Startup folder that ran `start "" /B claude-memsync.exe run`. Because /B shares the parent console, the daemon stayed attached to cmd.exe's console, keeping the window open for as long as the daemon ran. Switch to a .vbs launcher using WScript.Shell.Run with window-style 0 and bWaitOnReturn=False — wscript.exe launches the daemon hidden and detached, then exits. No console window is left behind. installTask and uninstallTask also remove the legacy claude-memsync.cmd so users upgrading from an older install don't end up with both launchers firing at next logon. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
.cmdranstart \"\" /B claude-memsync.exe run, which shares the parent console — so the daemon stayed attached tocmd.exeand the console window persisted at logon for as long as the daemon ran..vbslauncher usingWScript.Shell.Run cmd, 0, False.wscript.exelaunches the daemon hidden and detached, then exits — no console is left behind.installTaskanduninstallTaskalso remove the legacyclaude-memsync.cmdso users upgrading from an older install don't end up with both launchers firing at next logon.The
claude-memsync start(manual) path was already detached viaDETACHED_PROCESS | CREATE_NEW_PROCESS_GROUP— only the auto-start-at-logon path was affected.Test plan
go build ./cmd/...— cleango vet ./...— cleanclaude-memsync uninstall(with the old build), build new binary,claude-memsync install, confirmclaude-memsync.vbsexists andclaude-memsync.cmdis gone, log out / log back in, confirm no console window appears andclaude-memsync statusreports running..cmdin place, run newclaude-memsync install, confirm the.cmdis removed and only.vbsremains.🤖 Generated with Claude Code