Skip to content

Commit e372270

Browse files
committed
feat: added silent args to mitigation scripts
1 parent 48edbe6 commit e372270

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management
4747
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'}"
4848
if "%CPU%" neq "" (
4949
reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v "FeatureSettingsOverride" /t REG_DWORD /d "%CPU%" /f > nul
50-
)
50+
)
5151

5252
:: Enable Structured Exception Handling Overwrite Protection (SEHOP)
5353
reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\kernel" /v "DisableExceptionChainValidation" /t REG_DWORD /d "0" /f > nul
@@ -79,6 +79,8 @@ reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager" /v "ProtectionMo
7979
:: Enable for Hyper-V
8080
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Virtualization" /v "MinVmVersionForCpuBasedMitigations" /t REG_SZ /d "1.0" /f > nul
8181

82+
if "%~1" == "/silent" exit /b
83+
8284
echo Finished, please reboot your device for changes to apply.
8385
pause
8486
exit /b

src/playbook/Executables/AtlasDesktop/7. Security/Mitigations/Set Windows Default Mitigations.cmd

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager" /v "ProtectionMo
4545
:: Default Hyper-V Settings
4646
reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Virtualization" /v "MinVmVersionForCpuBasedMitigations" /f > nul 2>&1
4747

48+
if "%~1" == "/silent" exit /b
49+
4850
echo Finished, please reboot your device for changes to apply.
4951
pause
5052
exit /b

0 commit comments

Comments
 (0)