如何运行.exe低优先级?我知道我可以去任务管理器,并手动更改优先级设置,但有没有办法可以.exe从一个.bat文件中启动一个命令,使.exe以给定的优先级运行(在这种情况下为低)?.exe是我用C++编写的程序; 我可以在C++代码中设置优先级吗?
我正在运行Windows XP.
在批处理文件中,您可以使用以下start命令:
Starts a separate window to run a specified program or command.
START ["title"] [/D path] [/I] [/MIN] [/MAX] [/SEPARATE | /SHARED]
[/LOW | /NORMAL | /HIGH | /REALTIME | /ABOVENORMAL | /BELOWNORMAL]
[/AFFINITY <hex affinity>] [/WAIT] [/B] [command/program]
[parameters]
[ . . . ]
LOW Start application in the IDLE priority class
NORMAL Start application in the NORMAL priority class
HIGH Start application in the HIGH priority class
REALTIME Start application in the REALTIME priority class
ABOVENORMAL Start application in the ABOVENORMAL priority class
BELOWNORMAL Start application in the BELOWNORMAL priority class
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1577 次 |
| 最近记录: |