From f77bf29528882ee287b4e030f596f3b389759559 Mon Sep 17 00:00:00 2001 From: he3als <65787561+he3als@users.noreply.github.com> Date: Mon, 7 Oct 2024 14:21:23 +0100 Subject: [PATCH] fix(enable all mitigations): support multiple CPUs --- .../7. Security/Mitigations/Enable All Mitigations.cmd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/playbook/Executables/AtlasDesktop/7. Security/Mitigations/Enable All Mitigations.cmd b/src/playbook/Executables/AtlasDesktop/7. Security/Mitigations/Enable All Mitigations.cmd index 48648ef8f8..a286811019 100644 --- a/src/playbook/Executables/AtlasDesktop/7. Security/Mitigations/Enable All Mitigations.cmd +++ b/src/playbook/Executables/AtlasDesktop/7. Security/Mitigations/Enable All Mitigations.cmd @@ -20,7 +20,7 @@ whoami /user | find /i "S-1-5-18" > nul 2>&1 || ( :main :: Enable Spectre and Meltdown reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v "FeatureSettingsOverrideMask" /t REG_DWORD /d "3" /f > nul -powershell -NonI -NoP -C "$proc = (Get-CimInstance Win32_Processor).Name; $env:CPU = if ($proc | sls 'Intel' -Quiet) {'0'} elseif ($proc | sls 'AMD' -Quiet) {'64'}" +powershell -NonI -NoP -C "$proc = (Get-CimInstance Win32_Processor | Select-Object -First 1).Name; $env:CPU = if ($proc | sls 'Intel' -Quiet) {'0'} elseif ($proc | sls 'AMD' -Quiet) {'64'}" if "%CPU%" neq "" ( reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v "FeatureSettingsOverride" /t REG_DWORD /d "%CPU%" /f > nul ) @@ -57,4 +57,4 @@ reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Virtualization" /v "M echo Finished, please reboot your device for changes to apply. pause -exit /b \ No newline at end of file +exit /b