diff --git a/windows/fix_mihoyo_shortcut.bat b/windows/fix_mihoyo_shortcut.bat index 5116b79..b6be197 100644 --- a/windows/fix_mihoyo_shortcut.bat +++ b/windows/fix_mihoyo_shortcut.bat @@ -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