From 46edb94ab977dcac8d657d20daf002fec7dba411 Mon Sep 17 00:00:00 2001 From: Oscar <7408635+Molier@users.noreply.github.com> Date: Sat, 18 Jan 2025 20:34:53 +0100 Subject: [PATCH 1/2] Update Install.bat fix: support both pwsh and powershell.exe in install/uninstall scripts - Add fallback to powershell.exe if pwsh not found - Prevent silent failures by checking for PowerShell availability - Add pause to show errors before window closes --- Install.bat | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) 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 From 5266f14867485bfc457c84f50c12f11f198f79eb Mon Sep 17 00:00:00 2001 From: Oscar <7408635+Molier@users.noreply.github.com> Date: Sat, 18 Jan 2025 20:36:10 +0100 Subject: [PATCH 2/2] Update Uninstall.bat fix: support both pwsh and powershell.exe in install/uninstall scripts - Add fallback to powershell.exe if pwsh not found - Prevent silent failures by checking for PowerShell availability - Add pause to show errors before window closes --- Uninstall.bat | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) 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