fix path, use string instead of ids

This commit is contained in:
Mylloon 2024-12-27 15:45:11 +01:00
parent a7ce4be365
commit d7e37c0234
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -1,10 +1,11 @@
@ECHO OFF
SETLOCAL ENABLEDELAYEDEXPANSION
SET "collapse=%ProgramFiles%\Collapse Launcher\current"
SET "collapse=%LOCALAPPDATA%\CollapseLauncher\current"
SET "exe=CollapseLauncher.exe"
SET "iconpath=Assets\Images\GameIcon"
SET "shortcutpath=%APPDATA%\Microsoft\Windows\Start Menu\Programs"
SET "args=open --region \"Global\" --play --game"
:: Genshin shortcut
ECHO Genshin shortcut creation...
@ -12,7 +13,7 @@ PowerShell -Command "" ^
"$WshShell = New-Object -comObject WScript.Shell;" ^
"$Shortcut = $WshShell.CreateShortcut('!shortcutpath!\Genshin Impact.lnk');" ^
"$Shortcut.TargetPath = '!collapse!\!exe!';" ^
"$Shortcut.Arguments = 'open --game 1 --region 0 --play';" ^
"$Shortcut.Arguments = '!args! \"Genshin Impact\"';" ^
"$Shortcut.IconLocation = '!collapse!\!iconpath!\icon-genshin.ico';" ^
"$Shortcut.Save()"
@ -22,7 +23,7 @@ PowerShell -Command "" ^
"$WshShell = New-Object -comObject WScript.Shell;" ^
"$Shortcut = $WshShell.CreateShortcut('!shortcutpath!\Honkai Star Rail - HSR.lnk');" ^
"$Shortcut.TargetPath = '!collapse!\!exe!';" ^
"$Shortcut.Arguments = 'open --game 2 --region 0 --play';" ^
"$Shortcut.Arguments = '!args! \"Honkai: Star Rail\"';" ^
"$Shortcut.IconLocation = '!collapse!\!iconpath!\icon-starrail.ico';" ^
"$Shortcut.Save()"
@ -32,7 +33,7 @@ PowerShell -Command "" ^
"$WshShell = New-Object -comObject WScript.Shell;" ^
"$Shortcut = $WshShell.CreateShortcut('!shortcutpath!\Zenless Zone Zero - ZZZ.lnk');" ^
"$Shortcut.TargetPath = '!collapse!\!exe!';" ^
"$Shortcut.Arguments = 'open --game 3 --region 0 --play';" ^
"$Shortcut.Arguments = '!args! \"Zenless Zone Zero\"';" ^
"$Shortcut.IconLocation = '!collapse!\!iconpath!\icon-zenless.ico';" ^
"$Shortcut.Save()"