Windows: autostart Run entry is written without quotes when install path contains spaces

Open Beginner friendly
#1,338 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
68/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
dart, flutter

Research direction

Locate the Windows autostart implementation that writes the HKCU\Software\Microsoft\Windows\CurrentVersion\Run entry, then inspect how the executable path and --hidden argument are assembled. Reproduce with an install path containing spaces and verify that the stored command quotes the full executable path while preserving the argument.

Written by the indexing model from the issue text.

Description

Summary

On Windows, when Gopeed is installed in a path that contains spaces, the autostart registry command is written without quotes around the executable path.

Observed value in HKCU\Software\Microsoft\Windows\CurrentVersion\Run:

D:\Program Files\gopeed\gopeed.exe --hidden

Expected value:

"D:\Program Files\gopeed\gopeed.exe" --hidden

Because the path is not quoted, Task Manager > Startup apps shows a stray entry named Program, and Windows can parse the command incorrectly.

Environment
  • Gopeed version: 1.9.3+1
  • OS: Windows build 26200
  • Install path: D:\Program Files\gopeed\gopeed.exe
Steps To Reproduce
  1. Install Gopeed into a directory with spaces, for example D:\Program Files\gopeed.
  2. Enable Gopeed autostart / launch at login.
  3. Check the value written to HKCU\Software\Microsoft\Windows\CurrentVersion\Run.
  4. The executable path is stored without surrounding quotes.
Expected Behavior

The startup command should always quote the executable path before appending arguments.

Suggested Fix

When writing the Windows autostart command, generate:

"<full-path-to-gopeed.exe>" --hidden

instead of:

<full-path-to-gopeed.exe> --hidden
Dominant language
Dart
Stars
26.4k
Forks
1.7k
Avg merge
1d 6h
Merged PRs (30d)
50

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from GopeedLab/gopeed

All issues in GopeedLab/gopeed

Similar issues

More Dart issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.