Set Process Priority Utility
A small scriptable utility I threw together which given a process ID will set that process to a specified priority class, by default to "idle/low."
The utility runs only on Windows 2000, XP, 2003 and Vista.
SetPrio.zip (27 KB) or SetPrio.exe (60 KB)
To use the utility, make sure it is in your path and type SetPrio /P {ProcessID} where {ProcessID} is the process that you want to adjust.
Sets the priority of a process.
SetPrio /P processID [/L Priority]
/P The process ID (PID) to change./L Priority - 0 - 4
0 = Low [Default]1 = Below Normal
2 = Normal
3 = Above Normal
4 = High
Example: SETPRIO /P 9170 /L 1
This utility normally is *not* successful with processes you did not create. For example, you cannot change the priority of an executable started by another user in a terminal server enviornment (and it does not matter that you are an administrator).
No guarantees or warrantees. It works well enough for what it was designed and intended to do. For the Windows programmer types, the utility is little more than a fancy wrapper for the API SetPriorityClass. I just needed it scriptable and to be able to run on an arbitrary process (one that I wanted to start at normal priority, but change it if necessary).
Comments
This utility is GREAT! I need it to increase priority of Media / DVD Players for smooth playback, or to decrease priority of p2p or heavy math calculation applications.
BUT, PLEASE!!!!!! PLEASE change the /P feature, or add something so that one can specify the APPLICATION NAME!
I know, there could be multiple instances running, but I need something like:
SETPRIO matlab.exe /L 1
SETPRIO wmplayer.exe /L 3
Otherwise it's useless for batch scripting. How else would you get the PID? There are other batch utilities for that, but then you've got to temporarily store the PID, or I gotta write a whole program to retrieve the PID, which I could've done in the first place to set the priority.....
Posted by: Linus Atorf | January 17, 2006 7:09 AM
Just Written this application takes the process image name rather than pid as input. See readme file. http://www.dcs.warwick.ac.uk/~csucai/ProcessPriority.zip
Source code available on request.
Posted by: Will Lewis | May 5, 2006 6:12 AM