Without quotations around %PS_EXE% and the user's Powershell.exe is located in C:\Program Files, the script fails with the following error popup.
Title: C:\Program
Text: Windows cannot find 'C:\Program'. Make sure you typed the name correctly, and then try again.
This error can be solved by adding quotations around %PS_EXE% in the conditional statement for %MENUOPT%.
Original:
if "%MENUOPT%"=="1" (
echo [INFO] Launching interactive script in a new PowerShell window...
start "TelemetryBlocker-Interactive" %PS_EXE% -NoProfile -ExecutionPolicy Bypass -File "%PS_SCRIPT%" -Interactive -EnableAuditLog
exit /b
)
Modified
if "%MENUOPT%"=="1" (
echo [INFO] Launching interactive script in a new PowerShell window...
start "TelemetryBlocker-Interactive" "%PS_EXE%" -NoProfile -ExecutionPolicy Bypass -File "%PS_SCRIPT%" -Interactive -EnableAuditLog
exit /b
)
All that I changed was %PS_EXE% -> "%PS_EXE%", and the script was able to correctly locate Powershell.exe.
I have not tested any options other than "1. Run Interactive Script (Reccomended)", so I can't say if the issue persists in other locations.
Without quotations around
%PS_EXE%and the user's Powershell.exe is located inC:\Program Files, the script fails with the following error popup.Title: C:\Program
Text: Windows cannot find 'C:\Program'. Make sure you typed the name correctly, and then try again.
This error can be solved by adding quotations around
%PS_EXE%in the conditional statement for%MENUOPT%.Original:
Modified
All that I changed was
%PS_EXE%->"%PS_EXE%", and the script was able to correctly locate Powershell.exe.I have not tested any options other than "1. Run Interactive Script (Reccomended)", so I can't say if the issue persists in other locations.