Changing Windows process priority via command line
Solution 1:
The command line syntax:
wmic process where name="AppName" CALL setpriority ProcessIDLevel
Example:
wmic process where name="calc.exe" CALL setpriority 32768
or
wmic process where name="calc.exe" CALL setpriority "above normal"
Priority:
- idle: 64 (or "idle")
- below normal: 16384 (or "below normal")
- normal: 32 (or "normal")
- above normal: 32768 (or "above normal")
- high priority: 128 (or "high priority")
- real time: 256 (or "realtime")
Solution 2:
A small addition.
You can also use string values instead of integers (easier to memorize) like that:
wmic process where name="calc.exe" CALL setpriority "idle"
Possible values: "idle", "low", "below normal", "normal", "above normal", "high priority", "realtime"
PS. Don't forget the quotes, especially if using multiple words in a string value