├── LICENSE ├── Priority.cpp ├── Priority_de.cpp └── README.md /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 MScholtes 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Priority.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MScholtes/Priority/1751123f0686c0ce34a3e16f7adb3e6fce196415/Priority.cpp -------------------------------------------------------------------------------- /Priority_de.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MScholtes/Priority/1751123f0686c0ce34a3e16f7adb3e6fce196415/Priority_de.cpp -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Priority 2 | C++ command line utility to query or set CPU, memory and I/O priority (Windows) 3 | 4 | How To Compile 5 | - Start Visual Studio command prompt 6 | - Change to directory with Priority.cpp 7 | - compile with 8 | cl Priority.cpp   9 | 10 | Usage 11 | 12 | Priority [parameter] [PID|program] 13 | 14 | Shows (when called without parameters) or changes the CPU, memory and I/O priority and CPU affinity of a running process (memory priority can maximally be set  to normal, I/O priority to high at most).
15 | It is enough to supply a partly process name.
16 | Only the first found process is processed (see parameter /INSTANCE).
17 | If no process ID and no program name is supplied, the calling process is processed.
18 | 19 | Parameters:
20 | /INSTANCE:n - n. found process with name part is processed (default: 1.).
21 | /INSTANCE:ALL - all found processes with name part are processed.
22 | /LOW /BELOWNORMAL /NORMAL /ABOVENORMAL /HIGH /REALTIME - process gets respective priority.
23 | /ONLYCPU - only CPU priority is set.
24 | /CPUMASK:n - CPU affinity. Sum of 1=CPU0, 2=CPU1, 4=CPU2, 8=CPU3,... .
25 | 26 | Remarks 27 | 28 | Since Priority.exe cannot retrieve the process names of 64 bit executables in an WOW64 environment, compile Priority.exe as a 64 bit executable for a 64 bit OS and as a 32 bit executable for a 32 bit OS. 29 | --------------------------------------------------------------------------------