Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatic Discord install folder detection #198

Open
Speshkitty opened this issue Oct 26, 2024 · 0 comments
Open

Automatic Discord install folder detection #198

Speshkitty opened this issue Oct 26, 2024 · 0 comments

Comments

@Speshkitty
Copy link

Speshkitty commented Oct 26, 2024

A short snippet that detects the highest version number in %LOCALAPPDATA%/Discord and stores it in a variable

for /f "usebackq delims=" %%i in (`
  powershell -c "ls -Name -Path "%LOCALAPPDATA%/Discord" -Filter app-* | sort { [version]($_.Name -replace '^.*-(\d+(\.\d+){1,3})$', '$1') } -Descending | select -Index 0;"
`) do set folder=%%i

This uses System.Version for comparison, so should avoid any weird sorting issues.

I'm not sure what the best way to work that into the existing install script is, which is why this is an issue and not a PR.

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

No branches or pull requests

1 participant