diff --git a/gameupdate/patch.bat b/gameupdate/patch.bat index f7a78cd..22b661f 100644 --- a/gameupdate/patch.bat +++ b/gameupdate/patch.bat @@ -34,9 +34,26 @@ set _my_shell=pwsh REM Check if pwsh.exe exists where /q !_my_shell! if !errorlevel! neq 0 ( - echo pwsh not found. Falling back to powershell... - REM If pwsh is not found, set to powershell - set _my_shell=powershell + echo pwsh not found. + echo. + echo PowerShell 7 ^(pwsh^) is faster and recommended. + set /p "INSTALL_PWSH=Would you like to install it now via winget? (Y/N): " + if /I "!INSTALL_PWSH!"=="Y" ( + echo Installing PowerShell 7 via winget... + winget install --id Microsoft.PowerShell --source winget --accept-package-agreements --accept-source-agreements + if !errorlevel! neq 0 ( + echo Install failed or winget not available. Falling back to powershell... + set _my_shell=powershell + ) else ( + echo PowerShell 7 installed successfully. + echo Please re-run GameUpdate.bat to use pwsh. + pause + exit /b 0 + ) + ) else ( + echo Skipping install. Falling back to powershell... + set _my_shell=powershell + ) REM Check if powershell.exe exists echo Checking for powershell...