mirror of
https://github.com/Raphire/Win11Debloat.git
synced 2026-06-11 02:56:32 +00:00
Rename path variable
This commit is contained in:
6
Run.bat
6
Run.bat
@@ -19,17 +19,17 @@ if exist "%wtDefaultPath%" (
|
|||||||
set "wtPath="
|
set "wtPath="
|
||||||
)
|
)
|
||||||
|
|
||||||
set "SCRIPT_SHORT_PATH=\"%~dp0Win11Debloat.ps1\""
|
set "SCRIPT_PATH=\"%~dp0Win11Debloat.ps1\""
|
||||||
|
|
||||||
:: Launch script
|
:: Launch script
|
||||||
if defined wtPath (
|
if defined wtPath (
|
||||||
call :Log Launching Win11Debloat.ps1 with Windows Terminal...
|
call :Log Launching Win11Debloat.ps1 with Windows Terminal...
|
||||||
PowerShell -Command "Start-Process -FilePath '%wtPath%' -ArgumentList 'PowerShell -NoProfile -ExecutionPolicy Bypass -File %SCRIPT_SHORT_PATH%' -Verb RunAs" >> "%logFile%" || call :Error "PowerShell command failed"
|
PowerShell -Command "Start-Process -FilePath '%wtPath%' -ArgumentList 'PowerShell -NoProfile -ExecutionPolicy Bypass -File %SCRIPT_PATH%' -Verb RunAs" >> "%logFile%" || call :Error "PowerShell command failed"
|
||||||
call :Log Script execution passed successfully to Win11Debloat.ps1
|
call :Log Script execution passed successfully to Win11Debloat.ps1
|
||||||
) else (
|
) else (
|
||||||
echo Windows Terminal not found. Using default PowerShell instead...
|
echo Windows Terminal not found. Using default PowerShell instead...
|
||||||
call :Log Windows Terminal not found. Using default PowerShell to launch Win11Debloat.ps1...
|
call :Log Windows Terminal not found. Using default PowerShell to launch Win11Debloat.ps1...
|
||||||
PowerShell -ExecutionPolicy Bypass -Command "& {Start-Process PowerShell -ArgumentList '-NoProfile -ExecutionPolicy Bypass -File %SCRIPT_SHORT_PATH%' -Verb RunAs}" >> "%logFile%" || call :Error "PowerShell command failed"
|
PowerShell -ExecutionPolicy Bypass -Command "& {Start-Process PowerShell -ArgumentList '-NoProfile -ExecutionPolicy Bypass -File %SCRIPT_PATH%' -Verb RunAs}" >> "%logFile%" || call :Error "PowerShell command failed"
|
||||||
call :Log Script execution passed successfully to Win11Debloat.ps1
|
call :Log Script execution passed successfully to Win11Debloat.ps1
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user