codebytere

#54364: fix: match Windows login items when the executable path contains spaces

Merged
Created: Sep 25, 2026, 5:45:44 AM
Merged: Sep 25, 2026, 11:12:32 AM
2 comments
Target: main

Description of Change

Fixes #53911.

After this change app.getLoginItemSettings() on Windows finds the entries setLoginItemSettings() wrote when the executable path contains a space (C:\Program Files\..., a user profile with a space), and executableWillLaunchAtLogin reports true for them.

The lookup ran the executable path through CommandLine::FromString, which splits an unquoted path at the first space, so it never matched the quoted Run values that setLoginItemSettings() writes and returned no launchItems.

The lookup now compares the path as a plain executable path, stripping surrounding quotes if the caller passed them, and the two existing quote-stripping sites share one helper. A spec round-trips an entry whose path contains spaces.

Checklist

Release Notes

Notes: Fixed app.getLoginItemSettings() not finding login items on Windows when the executable path contains spaces.

Backports

45-x-y
Pending
Waiting for a manual backport

Semver Impact

Major
Breaking changes
Minor
New features
Patch
Bug fixes
None
Docs, tests, etc.

Semantic Versioning helps users understand the impact of updates:

  • Major (X.y.z): Breaking changes that may require code modifications
  • Minor (x.Y.z): New features that maintain backward compatibility
  • Patch (x.y.Z): Bug fixes that don't change the API
  • None: Changes that don't affect using facing parts of Electron