Skip to content

Commit

Permalink
fix(disable idle): support multiple CPUs
Browse files Browse the repository at this point in the history
  • Loading branch information
he3als authored Oct 7, 2024
1 parent 73f0c21 commit 5ef060d
Showing 1 changed file with 2 additions and 2 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

0 comments on commit 5ef060d

Please sign in to comment.