ProcessSetPriority
Changes the priority (as seen in Windows Task Manager) of a process.
ProcessSetPriority Priority, PID-or-Name
Command Example: ProcessSetPriority "High", "Notepad.exe" Function Example: PID := ProcessSetPriority("High","Notepad.exe")
- OutputVar
The name of the variable in which to store the PID of process which priority was changed or 0 / false otherwise (there was no matching process or there was a problem setting priority).
- PID-or-Name
This parameter can be either a number (the PID) or a process name as described below. It can also be left blank to get PID of the script itself.
PID: The Process ID, which is a number that uniquely identifies one specific process (this number is valid only during the lifetime of that process). The PID of a newly launched process can be determined via the Run command. Similarly, the PID of a window can be determined with WinGet.
Name: The name of a process is usually the same as its executable (without path), e.g. notepad.exe or winword.exe. Since a name might match multiple running processes, only the first process will be reported. The name is not case sensitive.
- Priority
Process priority: L (or Low), B (or BelowNormal), N (or Normal), A (or AboveNormal), H (or High), R (or Realtime).
Remarks
Note: Any process not designed to run at Realtime priority might reduce system stability if set to that level.
Related
ProcessExist, ProcessSetPriority, ProcessWait , ProcessWaitClose, Run, WinGet, WinClose, WinKill, WinWait, WinWaitClose, WinExist
Examples
ProcessSetPriority, High