add shortcut to long game names

This commit is contained in:
Mylloon 2024-07-29 15:10:49 +02:00
parent 78b1fc6177
commit 623b8b241b
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -5,12 +5,13 @@ SET "collapse=%ProgramFiles%\Collapse Launcher"
SET "exe=CollapseLauncher.exe"
FOR /F "usebackq delims=" %%i IN (`dir /B /S "!collapse!\app-*"`) DO SET "vbc=%%i"
SET "iconpath=Assets\Images\GameIcon"
SET "shortcutpath=%APPDATA%\Microsoft\Windows\Start Menu\Programs"
:: Genshin shortcut
ECHO Genshin shortcut creation...
PowerShell -Command "" ^
"$WshShell = New-Object -comObject WScript.Shell;" ^
"$Shortcut = $WshShell.CreateShortcut('%APPDATA%\Microsoft\Windows\Start Menu\Programs\Genshin Impact.lnk');" ^
"$Shortcut = $WshShell.CreateShortcut('!shortcutpath!\Genshin Impact.lnk');" ^
"$Shortcut.TargetPath = '!collapse!\!exe!';" ^
"$Shortcut.Arguments = 'open --game 1 --region 0 --play';" ^
"$Shortcut.IconLocation = '!vbc!\!iconpath!\icon-genshin.ico';" ^
@ -20,7 +21,7 @@ PowerShell -Command "" ^
ECHO Honkai shortcut creation...
PowerShell -Command "" ^
"$WshShell = New-Object -comObject WScript.Shell;" ^
"$Shortcut = $WshShell.CreateShortcut('%APPDATA%\Microsoft\Windows\Start Menu\Programs\Honkai Star Rail.lnk');" ^
"$Shortcut = $WshShell.CreateShortcut('!shortcutpath!\Honkai Star Rail - HSR.lnk');" ^
"$Shortcut.TargetPath = '!collapse!\!exe!';" ^
"$Shortcut.Arguments = 'open --game 2 --region 0 --play';" ^
"$Shortcut.IconLocation = '!vbc!\!iconpath!\icon-starrail.ico';" ^
@ -30,7 +31,7 @@ PowerShell -Command "" ^
ECHO ZZZ shortcut creation...
PowerShell -Command "" ^
"$WshShell = New-Object -comObject WScript.Shell;" ^
"$Shortcut = $WshShell.CreateShortcut('%APPDATA%\Microsoft\Windows\Start Menu\Programs\Zenless Zone Zero.lnk');" ^
"$Shortcut = $WshShell.CreateShortcut('!shortcutpath!\Zenless Zone Zero - ZZZ.lnk');" ^
"$Shortcut.TargetPath = '!collapse!\!exe!';" ^
"$Shortcut.Arguments = 'open --game 3 --region 0 --play';" ^
"$Shortcut.IconLocation = '!vbc!\!iconpath!\icon-zenless.ico';" ^