electron: [Bug]: Windows: openAtLogin doesn't work if app install path has space

Preflight Checklist

Electron Version

16.06

What operating system are you using?

Windows

Operating System Version

Windows 11 Pro 22000.376

What arch are you using?

x64

Last Known Working Electron version

none

Expected Behavior

App starts up on login after openAtLogin is set to true. Specifically, the registry value installed includes escaping or surrounding entire path with " so the spaces don’t break startup.

Actual Behavior

App does not start on login up after openAtLogin is set to true. The registry value installed is a raw string value of the path, and spaces in that path mess things up.

Testcase Gist URL

  1. Create a windows account with a space in the username
  2. Log into that account
  3. Install Electron Fiddle
  4. Load this gist (it will automatically set openAtLogin: true) https://gist.github.com/scottnonnenberg-signal/7b5152ecafb41222a90648d782bfd509
  5. Log out
  6. Log back in

Note: The app should start up when you log in, but it doesn’t. This is different from users who have no space in their name. Things work as expected for them.

Additional Information

You can repro this on recent versions of Signal Desktop.

Original user bug here: https://github.com/signalapp/Signal-Desktop/issues/5720

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Comments: 15 (3 by maintainers)

Commits related to this issue

Most upvoted comments

This issue has been reported here too.
As a workaround, I’m adding quotes using registry-js if necessary. See this commit