diff --git a/src/playbook/Executables/AtlasDesktop/3. General Configuration/Power/CPU Idle/Disable Idle.cmd b/src/playbook/Executables/AtlasDesktop/3. General Configuration/Power/CPU Idle/Disable Idle.cmd index 6d8f3681ad..1cb8d688f2 100644 --- a/src/playbook/Executables/AtlasDesktop/3. General Configuration/Power/CPU Idle/Disable Idle.cmd +++ b/src/playbook/Executables/AtlasDesktop/3. General Configuration/Power/CPU Idle/Disable Idle.cmd @@ -1,9 +1,8 @@ @echo off :: Check if hyper threading is enabled -for /f "tokens=2 delims==" %%a in ('wmic cpu get NumberOfCores /value') do set "PHYSICAL_CORES=%%a" -for /f "tokens=2 delims==" %%a in ('wmic cpu get NumberOfLogicalProcessors /value') do set "LOGICAL_CORES=%%a" -if "%LOGICAL_CORES%" GTR "%PHYSICAL_CORES%" goto :hyperThreading +powershell -NonI -NoP -C "$proc = Get-CimInstance Win32_Processor; if ([int]$proc.NumberOfLogicalProcessors -gt [int]$proc.NumberOfCores) { exit 262 }" +if "%errorlevel%"=="262" goto :hyperThreading if "%~1" neq "/silent" ( echo This forces your CPU to work at its maximum speed always, ensure you have good cooling. 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 9f229895e0..48648ef8f8 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,12 +20,10 @@ 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 -wmic cpu get name | findstr "Intel" > nul && ( - reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v "FeatureSettingsOverride" /t REG_DWORD /d "0" /f > nul -) -wmic cpu get name | findstr "AMD" > nul && ( - reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v "FeatureSettingsOverride" /t REG_DWORD /d "64" /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'}" +if "%CPU%" neq "" ( + reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v "FeatureSettingsOverride" /t REG_DWORD /d "%CPU%" /f > nul +) :: Enable Structured Exception Handling Overwrite Protection (SEHOP) reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\kernel" /v "DisableExceptionChainValidation" /t REG_DWORD /d "0" /f > nul diff --git a/src/playbook/Executables/AtlasDesktop/8. Troubleshooting/Network/Reset Network to Atlas Default.cmd b/src/playbook/Executables/AtlasDesktop/8. Troubleshooting/Network/Reset Network to Atlas Default.cmd index a47e341376..da65ab5787 100644 --- a/src/playbook/Executables/AtlasDesktop/8. Troubleshooting/Network/Reset Network to Atlas Default.cmd +++ b/src/playbook/Executables/AtlasDesktop/8. Troubleshooting/Network/Reset Network to Atlas Default.cmd @@ -14,7 +14,7 @@ fltmc > nul 2>&1 || ( echo Setting network settings to Atlas defaults... :: Set network adapter driver registry key -for /f %%a in ('wmic path Win32_NetworkAdapter get PNPDeviceID^| findstr /L "PCI\VEN_"') do ( +for /f "usebackq" %%a in (`powershell -NonI -NoP -C "(Get-CimInstance Win32_NetworkAdapter).PNPDeviceID | sls 'PCI\\VEN_'"`) do ( for /f "tokens=3" %%b in ('reg query "HKLM\SYSTEM\CurrentControlSet\Enum\%%a" /v "Driver"') do ( set "netKey=HKLM\SYSTEM\CurrentControlSet\Control\Class\%%b" ) > nul 2>&1