mirror of
https://github.com/Raphire/Win11Debloat.git
synced 2026-07-20 21:10:20 +08:00
Fix Run.bat quoting bug (again) breaking on certain paths
This commit is contained in:
parent
a2e3eb2987
commit
80b5452147
4
Run.bat
4
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
|
||||
)
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user