confOS/windows/apply_mihoyo_shortcut.bat
2024-12-09 08:44:53 +01:00

40 lines
1.5 KiB
Batchfile

@ECHO OFF
SETLOCAL ENABLEDELAYEDEXPANSION
SET "collapse=%ProgramFiles%\Collapse Launcher\current"
SET "exe=CollapseLauncher.exe"
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('!shortcutpath!\Genshin Impact.lnk');" ^
"$Shortcut.TargetPath = '!collapse!\!exe!';" ^
"$Shortcut.Arguments = 'open --game 1 --region 0 --play';" ^
"$Shortcut.IconLocation = '!collapse!\!iconpath!\icon-genshin.ico';" ^
"$Shortcut.Save()"
:: Honkai shortcut
ECHO Honkai shortcut creation...
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.IconLocation = '!collapse!\!iconpath!\icon-starrail.ico';" ^
"$Shortcut.Save()"
:: ZZZ shortcut
ECHO ZZZ shortcut creation...
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.IconLocation = '!collapse!\!iconpath!\icon-zenless.ico';" ^
"$Shortcut.Save()"
IF NOT "%1"=="yes" PAUSE
EXIT /B