From d7e37c02343d7c1ff74ca00037985229024d6af2 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Fri, 27 Dec 2024 15:45:11 +0100 Subject: [PATCH] fix path, use string instead of ids --- windows/apply_mihoyo_shortcut.bat | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/windows/apply_mihoyo_shortcut.bat b/windows/apply_mihoyo_shortcut.bat index b6be197..c553791 100644 --- a/windows/apply_mihoyo_shortcut.bat +++ b/windows/apply_mihoyo_shortcut.bat @@ -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()"