From 7d655090459612aee879ab80814455b9c0fce947 Mon Sep 17 00:00:00 2001 From: he3als <65787561+he3als@users.noreply.github.com> Date: Thu, 13 Jun 2024 20:17:02 +0100 Subject: [PATCH] fix(fileassoc): 7zip variable syntax --- src/playbook/Executables/FILEASSOC.cmd | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/playbook/Executables/FILEASSOC.cmd b/src/playbook/Executables/FILEASSOC.cmd index d442d158d4..6c8be76c23 100644 --- a/src/playbook/Executables/FILEASSOC.cmd +++ b/src/playbook/Executables/FILEASSOC.cmd @@ -36,10 +36,10 @@ if "%~1" == "Brave" set "associations=%baseAssociations% %braveAssociations%" if "%~1" == "LibreWolf" set "associations=%baseAssociations% %libreWolfAssociations%" if "%~1" == "Firefox" set "associations=%baseAssociations% %firefoxAssociations%" if "%~1" == "Google Chrome" set "associations=%baseAssociations% %chromeAssociations%" -if exist "%ProgramFiles%\7-Zip\7zFM.exe" set 7zip=y +if exist "%ProgramFiles%\7-Zip\7zFM.exe" set sevenZip=y :: Set 7-Zip assocations -if "%7zip%"=="y" call :7ZIPSYSTEM +if "%sevenZip%"=="y" call :7ZIPSYSTEM :: Make a temporary renamed PowerShell executable to bypass UCPD :: https://hitco.at/blog/windows-userchoice-protection-driver-ucpd/ @@ -53,7 +53,7 @@ copy /y "%powershellPath%" "%powershellTemp%" > nul for /f "usebackq tokens=2 delims=\" %%a in (`reg query HKU ^| findstr /r /x /c:"HKEY_USERS\\S-.*" /c:"HKEY_USERS\\AME_UserHive_[^_]*"`) do ( reg query "HKU\%%a" | findstr /c:"Volatile Environment" /c:"AME_UserHive_" > nul && ( echo Setting associations for "%%a"... - if "%7zip%"=="y" call :7ZIPUSER "%%a" + if "%sevenZip%"=="y" call :7ZIPUSER "%%a" "%powershellTemp%" -NoP -NonI -EP Bypass -File ASSOC.ps1 "Placeholder" "%%a" %associations% ) )