Skip to content

add-to-startup: fix path for Scoop compatibility, remove interactive prompt#84

Open
OmiChrome wants to merge 2 commits into
ililim:mainfrom
OmiChrome:scoop-compatible-startup
Open

add-to-startup: fix path for Scoop compatibility, remove interactive prompt#84
OmiChrome wants to merge 2 commits into
ililim:mainfrom
OmiChrome:scoop-compatible-startup

Conversation

@OmiChrome

@OmiChrome OmiChrome commented Mar 23, 2026

Copy link
Copy Markdown

Hey! Found a couple of small issues in add-to-startup.bat that break it when the app is installed via package managers like Scoop (or run from other automated scripts).

This PR fixes them while keeping everything exactly the same for regular manual users.

The changes

  1. Scoop/Package Manager support: When Scoop installs apps, it places them in a versioned folder (like 0.11\) and creates a current\ symlink pointing to it. Because %~dp0 resolves to the versioned folder, the scheduled task gets pinned to 0.11 and silently breaks every time the app updates.
    Fix: The script now checks if a current\ directory exists next to it. If it does, it uses that stable path for the task. If not, it just uses %~dp0 like before.

  2. Removed the interactive (Y/n) prompt: The set /p prompt hangs forever if the bat script is run non-interactively by an installer/package manager. The script already prints the path it's going to use anyway, so I just removed the prompt.

Hope this helps!

Ref: #83, ScoopInstaller/Extras#17461

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant