fix shortcut creation
This commit is contained in:
parent
6a15347a9e
commit
48f9199eed
1 changed files with 12 additions and 6 deletions
|
@ -2,22 +2,28 @@
|
|||
SETLOCAL ENABLEDELAYEDEXPANSION
|
||||
|
||||
SET "collapse=%ProgramFiles%\Collapse Launcher"
|
||||
FOR /F %%i IN ('dir /B /S ^"!collapse!\app-*^"') DO SET "vbc=%%i"
|
||||
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.WorkingDirectory = '!collapse!';" ^
|
||||
"$Shortcut.TargetPath = '!collapse!\CollapseLauncher.exe open -g 1 -r 0';" ^
|
||||
"$Shortcut.TargetPath = '!collapse!\!exe!';" ^
|
||||
"$Shortcut.Arguments = 'open -g 1 -r 0';" ^
|
||||
"$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\Genshin Impact.lnk');" ^
|
||||
"$Shortcut.WorkingDirectory = '!collapse!';" ^
|
||||
"$Shortcut.TargetPath = '!collapse!\CollapseLauncher.exe open -g 2 -r 0';" ^
|
||||
"$Shortcut = $WshShell.CreateShortcut('%APPDATA%\Microsoft\Windows\Start Menu\Programs\Honkai Star Rail.lnk');" ^
|
||||
"$Shortcut.TargetPath = '!collapse!\!exe!';" ^
|
||||
"$Shortcut.Arguments = 'open -g 2 -r 0';" ^
|
||||
"$Shortcut.IconLocation = '!vbc!\!iconpath!\icon-icon-starrail.ico';" ^
|
||||
"$Shortcut.Save()"
|
||||
|
||||
IF NOT "%1"=="yes" PAUSE
|
||||
|
|
Loading…
Reference in a new issue