Win10 have a option, set maxim CPU work for MsMpEng.exe? lazarus / 34-Windows ---------------------------------------------------------------------- d2010 · 2025-01-07 16:18 Happy new year2025 The Microsoft Antivirus inside Win10, they user/s can set limit of CPU at max40%. I have my application.exe (E.g. Any console.app.lpr) How to set max of cpu-work  with Lazarus for my app.exe? Code: [Select] Directory of C:\Program Files\Windows Defender 04/11/2018  06:29 PM           395,304 MpCmdRun.exe 04/11/2018  06:29 PM            69,016 MpUXSrv.exe 04/11/2018  06:29 PM           974,232 MSASCui.exe 04/11/2018  06:29 PM           486,816 MSASCuiL.exe 04/11/2018  06:29 PM            85,016 MsMpEng.exe ---------------------------------------------------------------------- Fibonacci · 2025-01-07 16:33 https://learn.microsoft.com/en- us/windows/win32/api/processthreadsapi/nf-processthreadsapi- setpriorityclass https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf- winbase-setthreadaffinitymask You cant limit your app to a specific CPU % using WinAPI. To achieve this, you will need to add small delays in your app, like in heavy work loops (compression? encryption? parsing something?).