exe in current dir too

This commit is contained in:
Mylloon 2024-12-09 08:41:36 +01:00
parent 3e309fca0a
commit b940dca201
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -1,9 +1,8 @@
@ECHO OFF
SETLOCAL ENABLEDELAYEDEXPANSION
SET "collapse=%ProgramFiles%\Collapse Launcher"
SET "collapse=%ProgramFiles%\Collapse Launcher\current"
SET "exe=CollapseLauncher.exe"
FOR /F "usebackq delims=" %%i IN (`dir /B /S "!collapse!\current"`) DO SET "vbc=%%i"
SET "iconpath=Assets\Images\GameIcon"
SET "shortcutpath=%APPDATA%\Microsoft\Windows\Start Menu\Programs"
@ -14,7 +13,7 @@ PowerShell -Command "" ^
"$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';" ^
"$Shortcut.IconLocation = '!collapse!\!iconpath!\icon-genshin.ico';" ^
"$Shortcut.Save()"
:: Honkai shortcut
@ -24,7 +23,7 @@ PowerShell -Command "" ^
"$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';" ^
"$Shortcut.IconLocation = '!collapse!\!iconpath!\icon-starrail.ico';" ^
"$Shortcut.Save()"
:: ZZZ shortcut
@ -34,7 +33,7 @@ PowerShell -Command "" ^
"$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';" ^
"$Shortcut.IconLocation = '!collapse!\!iconpath!\icon-zenless.ico';" ^
"$Shortcut.Save()"
IF NOT "%1"=="yes" PAUSE