Needed a way to set the process priority of all processes with the same name, the current ProcessSetPriority only sets the first result found. If you are trying to use this on a multiprocess app like Chrome.exe, then more than likely it will set the priority on the wrong PID. This version sets all PID with the same Process Name instead of just the first one. #RequireAdmin;Probably required for Vista/7+
ProcessSetPriorities("chrome.exe", 3);Example execution.
Func ProcessSetPriorities($Process, $priority);Same as ProcessSetPriority, except it sets all processes with the process name, instead of the first one found.
Global $Processes = ProcessList($Process);get Multiple Processes
For $i = 1 To $Processes[0][0]; For Each found unique PID
ProcessSetPriority($Processes[$i][1], $priority);Set Priority
Next
EndFunc ;==>ProcessSetPriorities