diff --git a/Install.bat b/Install.bat index afc49f4..87ff688 100644 --- a/Install.bat +++ b/Install.bat @@ -1 +1,12 @@ -powershell.exe -executionpolicy bypass -file ./Installer.ps1 -n ResolutionMatcher -i 1 +@echo off +where pwsh >nul 2>&1 || where powershell.exe >nul 2>&1 || ( + echo No PowerShell installation found at all + pause + exit /b 1 +) +where pwsh >nul 2>&1 && ( + pwsh -executionpolicy bypass -file ./Installer.ps1 -n ResolutionMatcher -i 1 +) || ( + powershell.exe -executionpolicy bypass -file ./Installer.ps1 -n ResolutionMatcher -i 1 +) +pause diff --git a/Uninstall.bat b/Uninstall.bat index 5bc6e03..791c6d2 100644 --- a/Uninstall.bat +++ b/Uninstall.bat @@ -1 +1,12 @@ -powershell.exe -executionpolicy bypass -file ./Installer.ps1 -n ResolutionMatcher -i 0 +@echo off +where pwsh >nul 2>&1 || where powershell.exe >nul 2>&1 || ( + echo No PowerShell installation found at all + pause + exit /b 1 +) +where pwsh >nul 2>&1 && ( + pwsh -executionpolicy bypass -file ./Installer.ps1 -n ResolutionMatcher -i 0 +) || ( + powershell.exe -executionpolicy bypass -file ./Installer.ps1 -n ResolutionMatcher -i 0 +) +pause