Skip to content

fix(windows): use VBScript launcher to avoid lingering cmd window at logon#1

Merged
rockfordlhotka merged 1 commit into
mainfrom
fix/windows-startup-vbs-launcher
May 9, 2026
Merged

fix(windows): use VBScript launcher to avoid lingering cmd window at logon#1
rockfordlhotka merged 1 commit into
mainfrom
fix/windows-startup-vbs-launcher

Conversation

@rockfordlhotka
Copy link
Copy Markdown
Member

Summary

  • The Windows install path drops a launcher into the per-user Startup folder. The old .cmd ran start \"\" /B claude-memsync.exe run, which shares the parent console — so the daemon stayed attached to cmd.exe and the console window persisted at logon for as long as the daemon ran.
  • Switch to a .vbs launcher using WScript.Shell.Run cmd, 0, False. wscript.exe launches the daemon hidden and detached, then exits — no console 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.
  • README updated to match.

The claude-memsync start (manual) path was already detached via DETACHED_PROCESS | CREATE_NEW_PROCESS_GROUP — only the auto-start-at-logon path was affected.

Test plan

  • go build ./cmd/... — clean
  • go vet ./... — clean
  • On a Windows machine: claude-memsync uninstall (with the old build), build new binary, claude-memsync install, confirm claude-memsync.vbs exists and claude-memsync.cmd is gone, log out / log back in, confirm no console window appears and claude-memsync status reports running.
  • Upgrade path: leave the legacy .cmd in place, run new claude-memsync install, confirm the .cmd is removed and only .vbs remains.

🤖 Generated with Claude Code

…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>
@rockfordlhotka rockfordlhotka merged commit 914ece3 into main May 9, 2026
3 checks passed
@rockfordlhotka rockfordlhotka deleted the fix/windows-startup-vbs-launcher branch May 9, 2026 18:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant