Skip to content

Windows Desktop Start at Login writes an unquoted executable path to HKCU Run #6473

Closed

Description

@federicorv25

Client or integration

Other — OpenCodex Desktop (Windows)

Area

Installation or packaging

Summary

OpenCodex Desktop 2.76.0 registers its Windows Start at Login entry under:

HKCU\Software\Microsoft\Windows\CurrentVersion\Run

with the executable path unquoted:

C:\Program Files\OpenCodex\opencodex-desktop.exe --autostart

Because the executable path contains spaces, I expected the registry command to quote the executable path:

"C:\Program Files\OpenCodex\opencodex-desktop.exe" --autostart

The app did still start correctly on this machine before I corrected the value manually, so this is not a confirmed startup failure in my environment. I am reporting the generated registration because an unquoted executable path containing spaces is ambiguous command-line syntax on Windows and is less robust than the quoted form.

Microsoft's CreateProcess documentation describes the ambiguity of unquoted executable paths containing spaces:
https://learn.microsoft.com/windows/win32/api/processthreadsapi/nf-processthreadsapi-createprocessw

I searched existing issues before filing. The closest related report I found is #696, but that issue concerns the older ocx tray install Run entry exceeding the 260-character limit. This report is specifically about the OpenCodex Desktop Start at Login entry and quoting of the desktop executable path.

Reproduction

  1. Install and launch OpenCodex Desktop 2.76.0 on Windows.
  2. Leave Start at Login enabled so the desktop app registers its login entry.
  3. Inspect the current-user Run key with PowerShell:
(Get-ItemProperty "HKCU:\Software\Microsoft\Windows\CurrentVersion\Run").OpenCodex
  1. Observe the generated value:
C:\Program Files\OpenCodex\opencodex-desktop.exe --autostart
  1. Win32_StartupCommand shows the same unquoted command:
Get-CimInstance Win32_StartupCommand |
  Where-Object Name -eq "OpenCodex" |
  Select-Object Name,Command

Observed before manual correction:

Name      Command
----      -------
OpenCodex C:\Program Files\OpenCodex\opencodex-desktop.exe --autostart
  1. Manually changing only that Run value to the quoted form works and Windows continues to recognize the startup entry correctly:
Set-ItemProperty `
  "HKCU:\Software\Microsoft\Windows\CurrentVersion\Run" `
  -Name "OpenCodex" `
  -Value '"C:\Program Files\OpenCodex\opencodex-desktop.exe" --autostart'

Verification after the change:

Name      Command
----      -------
OpenCodex "C:\Program Files\OpenCodex\opencodex-desktop.exe" --autostart

Version

OpenCodex Desktop 2.76.0

Operating system

Windows 11 x64 (exact build was not captured)

Provider and model

Not provider-specific.

Logs or error output

# Before manual correction
C:\Program Files\OpenCodex\opencodex-desktop.exe --autostart

# Expected / manually corrected value
"C:\Program Files\OpenCodex\opencodex-desktop.exe" --autostart

Screenshots and supporting files

No additional files are required to reproduce this; the registry value and PowerShell commands above capture the observed behavior.

Implementation context

Current main enables Desktop login autostart through tauri-plugin-autostart (desktop/src-tauri/src/first_run.rs) and configures the login-origin argument in desktop/src-tauri/src/lib.rs. desktop/src-tauri/Cargo.toml currently pins tauri-plugin-autostart = 2.5.0.

This may ultimately be behavior in the upstream Tauri autostart plugin, but the observable packaged OpenCodex Desktop registration on Windows is the unquoted Run value above.

Checks

  • I searched existing issues and documentation.
  • I removed secrets, tokens, account details, request credentials, and personal data.

Activity

  1. added
    bugSomething isn't working
    installInstallation or packaging
    platformOS/service/tray/ACL (Windows-heavy, not Windows-only)
    on Oct 2, 2026
  2. Ingwannu commented on Oct 3, 2026

    @Ingwannu
    Owner

    Thanks for separating the observed unquoted registration from a startup failure that was not reproduced. #6479 is the linked draft implementation for this Windows Desktop Start at Login case; please keep this issue open until the final patch is reviewed, Windows registration/repair behavior is verified, and the change lands on dev. A quoting source test alone is not evidence that the packaged installer upgrades an existing Run entry. I have not modified a registry entry, run Windows login startup, or treated the older tray-path issue #696 as an identical duplicate.

  3. lidge-jun commented on Oct 3, 2026

    @lidge-jun
    Owner

    Closing this issue at the maintainer's request as part of the recovered-train cleanup. The Windows Desktop autostart executable-quoting implementation from #6479 was carried into #6487, which is merged into dev.

    Final cross-platform CI passed at 7c59baf: https://github.com/lidge-jun/opencodex/actions/runs/37110109894.

    Verification limit: actual Windows Start at Login and packaged-installer repair of an existing Run entry were not exercised. This closure records the landed implementation and the requested issue disposition; it does not claim those native acceptance checks passed. This updates the earlier decision to leave the issue open for that acceptance. If the updated packaged app still writes an unquoted entry, this issue can be reopened with the observed registry value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinginstallInstallation or packagingplatformOS/service/tray/ACL (Windows-heavy, not Windows-only)

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions