- Local time
- 11:25 AM
- Posts
- 231
- OS
- Windows 11 27965
Theres an affinity tweak for a setting in my script that if the user has less than 4 cpu cores, the setting shouldnt be used. Using wmic, the cpu is queried for core count and then checks to see if enough cores are present to execute the command. Does this code look good (@garlin)?
for /f "tokens=*" %%f in ('wmic cpu get NumberOfCores /value ^| find "="') do set %%f
if !NumberOfCores! gtr 4 (
for /f %%i in ('wmic path Win32_VideoController get PNPDeviceID^| findstr /l "PCI\VEN_"') do (
reg add "HKLM\SYSTEM\CurrentControlSet\Enum\%%i\Device Parameters\Interrupt Management\Affinity Policy" /v "DevicePolicy" /t REG_DWORD /d "3" /f
)
Last edited:
My Computer
At a glance
Windows 11 27965Intel i7 7700 @4.0ghz64gb DDR4Radeon RX 5500 XT
- OS
- Windows 11 27965
- Computer type
- PC/Desktop
- CPU
- Intel i7 7700 @4.0ghz
- Memory
- 64gb DDR4
- Graphics Card(s)
- Radeon RX 5500 XT
- Sound Card
- Topping D50s
- Hard Drives
- NVMe
- PSU
- Corsair
- Keyboard
- Stelseries G6v2
- Mouse
- Zowie EC2
- Other Info
- https://www.youtube.com/shoober420




