Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/Atlas-OS/Atlas
Browse files Browse the repository at this point in the history
  • Loading branch information
he3als committed Oct 7, 2024
2 parents b52ebb1 + f77bf29 commit 9a3209f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@echo off

:: Check if hyper threading is enabled
powershell -NonI -NoP -C "$proc = Get-CimInstance Win32_Processor; if ([int]$proc.NumberOfLogicalProcessors -gt [int]$proc.NumberOfCores) { exit 262 }"
powershell -NonI -NoP -C "Get-CimInstance Win32_Processor | Foreach-Object { if ([int]$_.NumberOfLogicalProcessors -gt [int]$_.NumberOfCores) { exit 262 } }"
if "%errorlevel%"=="262" goto :hyperThreading

if "%~1" neq "/silent" (
Expand Down Expand Up @@ -46,4 +46,4 @@ echo]
echo %ESC%[1m%ESC%[33mPress any key to exit... %ESC%[?25l

pause > nul
exit /b 1
exit /b 1
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand Down Expand Up @@ -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
exit /b

0 comments on commit 9a3209f

Please sign in to comment.