Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I change the priority of a process? [closed]

Can anyone provide a Delphi example of code that changes the priority class of a process?

I need to get the process by name from the Windows XP Task manager and change its priority using delphi code.

like image 636
mortalis Avatar asked Dec 19 '11 19:12

mortalis


People also ask

Which command is used to change the priority of a process?

You can change the scheduling priority of a running process to a value lower or higher than the base scheduling priority by using the renice command from the command line. This command changes the nice value of a process.

How do I change the priority in Windows 10?

Right-click on your selected process and navigate to Set priority. This drops down a sub-menu listing all the priority levels. Select the intended level (Below normal in our example).


1 Answers

you must use the SetPriorityClass function.

This function is part of the windows unit, this is a sample

SetPriorityClass(GetCurrentProcess(), HIGH_PRIORITY_CLASS);
like image 169
RRUZ Avatar answered Oct 04 '22 02:10

RRUZ