From 80b545214704e32aeacb100e89a263ef130dcda9 Mon Sep 17 00:00:00 2001 From: Jeffrey <9938813+Raphire@users.noreply.github.com> Date: Tue, 7 Jul 2026 20:45:45 +0200 Subject: [PATCH] Fix Run.bat quoting bug (again) breaking on certain paths --- Run.bat | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Run.bat b/Run.bat index 1bd6f6c..76a0b3f 100644 --- a/Run.bat +++ b/Run.bat @@ -24,12 +24,12 @@ set "SCRIPT_PATH=%~dp0Win11Debloat.ps1" :: Launch script if defined wtPath ( call :Log Launching Win11Debloat.ps1 with Windows Terminal... - PowerShell -NoProfile -ExecutionPolicy Bypass -Command "$p='%SCRIPT_PATH%'; Start-Process -FilePath '%wtPath%' -ArgumentList @('PowerShell','-NoProfile','-ExecutionPolicy','Bypass','-File',$p) -Verb RunAs" >> "%logFile%" || call :Error "PowerShell command failed" + PowerShell -NoProfile -ExecutionPolicy Bypass -Command "$p='%SCRIPT_PATH%'; $q=[char]34; Start-Process -FilePath '%wtPath%' -ArgumentList ('PowerShell -NoProfile -ExecutionPolicy Bypass -File ' + $q + $p + $q) -Verb RunAs" >> "%logFile%" || call :Error "PowerShell command failed" call :Log Script execution passed successfully to Win11Debloat.ps1 ) else ( echo Windows Terminal not found. Using default PowerShell instead... call :Log Windows Terminal not found. Using default PowerShell to launch Win11Debloat.ps1... - PowerShell -NoProfile -ExecutionPolicy Bypass -Command "$p='%SCRIPT_PATH%'; Start-Process PowerShell -ArgumentList @('-NoProfile','-ExecutionPolicy','Bypass','-File',$p) -Verb RunAs" >> "%logFile%" || call :Error "PowerShell command failed" + PowerShell -NoProfile -ExecutionPolicy Bypass -Command "$p='%SCRIPT_PATH%'; $q=[char]34; Start-Process PowerShell -ArgumentList ('-NoProfile -ExecutionPolicy Bypass -File ' + $q + $p + $q) -Verb RunAs" >> "%logFile%" || call :Error "PowerShell command failed" call :Log Script execution passed successfully to Win11Debloat.ps1 )