Skip to content

Commit f77bf29

Browse files
authored
fix(enable all mitigations): support multiple CPUs
1 parent 5ef060d commit f77bf29

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/playbook/Executables/AtlasDesktop/7. Security/Mitigations/Enable All Mitigations.cmd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ whoami /user | find /i "S-1-5-18" > nul 2>&1 || (
2020
:main
2121
:: Enable Spectre and Meltdown
2222
reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v "FeatureSettingsOverrideMask" /t REG_DWORD /d "3" /f > nul
23-
powershell -NonI -NoP -C "$proc = (Get-CimInstance Win32_Processor).Name; $env:CPU = if ($proc | sls 'Intel' -Quiet) {'0'} elseif ($proc | sls 'AMD' -Quiet) {'64'}"
23+
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'}"
2424
if "%CPU%" neq "" (
2525
reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v "FeatureSettingsOverride" /t REG_DWORD /d "%CPU%" /f > nul
2626
)
@@ -57,4 +57,4 @@ reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Virtualization" /v "M
5757

5858
echo Finished, please reboot your device for changes to apply.
5959
pause
60-
exit /b
60+
exit /b

0 commit comments

Comments
 (0)