30 lines
1.2 KiB
Batchfile
30 lines
1.2 KiB
Batchfile
@ECHO OFF
|
|
SETLOCAL ENABLEDELAYEDEXPANSION
|
|
|
|
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"
|
|
|
|
:: 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.TargetPath = '!collapse!\!exe!';" ^
|
|
"$Shortcut.Arguments = 'open --game 1 --region 0 --play';" ^
|
|
"$Shortcut.IconLocation = '!vbc!\!iconpath!\icon-genshin.ico';" ^
|
|
"$Shortcut.Save()"
|
|
|
|
:: Honkai shortcut
|
|
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.TargetPath = '!collapse!\!exe!';" ^
|
|
"$Shortcut.Arguments = 'open --game 2 --region 0 --play';" ^
|
|
"$Shortcut.IconLocation = '!vbc!\!iconpath!\icon-starrail.ico';" ^
|
|
"$Shortcut.Save()"
|
|
|
|
IF NOT "%1"=="yes" PAUSE
|
|
EXIT /B
|