Skip to content

Windows auto-update always fails: Command Code cannot be closed loop #40

Description

@AHKH3

Description

Every time Command Code desktop tries to auto-update on Windows, the updater shows this error:

Command Code Setup: Command Code cannot be closed. Please close it manually and click Retry to continue.

This happens even when:

  • The Command Code process is not running (verified via Task Manager, Get-Process, and Get-CimInstance Win32_Process)
  • The executable is not locked (verified by opening it with exclusive access)
  • No child processes or background services are running

The user is forced to:

  1. Click Retry repeatedly (never works)
  2. Close the installer
  3. Fully uninstall Command Code manually (delete Program Files, AppData\Local, AppData\Roaming)
  4. Reinstall from scratch

This is a recurring issue - it happens on every single update.

Environment

  • OS: Windows 11
  • Architecture: x64
  • Installer: CommandCode-0.1.18-x64-setup.exe --updated --force-run

Steps to Reproduce

  1. Command Code desktop auto-downloads an update
  2. The updater launches the NSIS setup with --updated --force-run
  3. Setup shows Command Code cannot be closed error
  4. The Command Code process is already closed - the error is a false positive
  5. Retry does not help

Expected Behavior

The updater should detect that the app is already closed and proceed, or at minimum provide a force-kill option.

Actual Behavior

The updater loops on the error with no way to proceed.

Suggestion

The process detection logic in the NSIS installer may be checking for a window title, mutex, or process name that persists after the app closes. Please investigate the process-detection mechanism used during updates.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions