confOS/windows/apply_mihoyo_shortcut.bat

41 lines
1.5 KiB
Batchfile
Raw Permalink Normal View History

2024-04-18 01:18:07 +02:00
@ECHO OFF
SETLOCAL ENABLEDELAYEDEXPANSION
2024-12-09 08:41:36 +01:00
SET "collapse=%ProgramFiles%\Collapse Launcher\current"
2024-04-18 01:34:33 +02:00
SET "exe=CollapseLauncher.exe"
SET "iconpath=Assets\Images\GameIcon"
2024-07-29 15:10:49 +02:00
SET "shortcutpath=%APPDATA%\Microsoft\Windows\Start Menu\Programs"
2024-04-18 01:18:07 +02:00
:: Genshin shortcut
2024-04-18 01:34:33 +02:00
ECHO Genshin shortcut creation...
2024-04-18 01:18:07 +02:00
PowerShell -Command "" ^
"$WshShell = New-Object -comObject WScript.Shell;" ^
2024-07-29 15:10:49 +02:00
"$Shortcut = $WshShell.CreateShortcut('!shortcutpath!\Genshin Impact.lnk');" ^
2024-04-18 01:34:33 +02:00
"$Shortcut.TargetPath = '!collapse!\!exe!';" ^
2024-04-18 16:46:57 +02:00
"$Shortcut.Arguments = 'open --game 1 --region 0 --play';" ^
2024-12-09 08:41:36 +01:00
"$Shortcut.IconLocation = '!collapse!\!iconpath!\icon-genshin.ico';" ^
2024-04-18 01:18:07 +02:00
"$Shortcut.Save()"
:: Honkai shortcut
2024-04-18 01:34:33 +02:00
ECHO Honkai shortcut creation...
2024-04-18 01:18:07 +02:00
PowerShell -Command "" ^
"$WshShell = New-Object -comObject WScript.Shell;" ^
2024-07-29 15:10:49 +02:00
"$Shortcut = $WshShell.CreateShortcut('!shortcutpath!\Honkai Star Rail - HSR.lnk');" ^
2024-04-18 01:34:33 +02:00
"$Shortcut.TargetPath = '!collapse!\!exe!';" ^
2024-04-18 16:46:57 +02:00
"$Shortcut.Arguments = 'open --game 2 --region 0 --play';" ^
2024-12-09 08:41:36 +01:00
"$Shortcut.IconLocation = '!collapse!\!iconpath!\icon-starrail.ico';" ^
2024-04-18 01:18:07 +02:00
"$Shortcut.Save()"
2024-07-16 18:45:23 +02:00
:: ZZZ shortcut
ECHO ZZZ shortcut creation...
PowerShell -Command "" ^
"$WshShell = New-Object -comObject WScript.Shell;" ^
2024-07-29 15:10:49 +02:00
"$Shortcut = $WshShell.CreateShortcut('!shortcutpath!\Zenless Zone Zero - ZZZ.lnk');" ^
2024-07-16 18:45:23 +02:00
"$Shortcut.TargetPath = '!collapse!\!exe!';" ^
"$Shortcut.Arguments = 'open --game 3 --region 0 --play';" ^
2024-12-09 08:41:36 +01:00
"$Shortcut.IconLocation = '!collapse!\!iconpath!\icon-zenless.ico';" ^
2024-07-16 18:45:23 +02:00
"$Shortcut.Save()"
2024-04-18 01:18:07 +02:00
IF NOT "%1"=="yes" PAUSE
EXIT /B