前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >windows通过命令行设置进程优先级

windows通过命令行设置进程优先级

原创
作者头像
Windows技术交流
修改2022-04-28 18:31:57
2.7K0
修改2022-04-28 18:31:57
举报
文章被收录于专栏:Windows技术交流Windows技术交流

针对进程的就通过这6个优先级来控制

图形界面可以通过任务管理器操作,也可以通过其他软件

cmd命令行示例:

wmic process where name="process name" CALL setpriority "value"

wmic process where name="firefox.exe" CALL setpriority "realtime"

wmic process where name="firefox.exe" CALL setpriority "high priority"

wmic process where name="firefox.exe" CALL setpriority "above normal"

wmic process where name="firefox.exe" CALL setpriority "normal"

wmic process where name="firefox.exe" CALL setpriority "below normal"

wmic process where name="firefox.exe" CALL setpriority "idle"

powershell命令行示例:

Get-WmiObject Win32_process -filter 'name = "ProcessName"' | foreach-object { $_.SetPriority(PriorityLevelID) }

例如:Get-WmiObject Win32_process -filter 'name = "firefox.exe"' | foreach-object { $_.SetPriority(32768) }

Priority Level ID

Priority Level Name

256

Realtime

128

High

32768

Above normal

32

Normal

16384

Below normal

64

Low

参考:

https://superuser.com/questions/620724/changing-windows-process-priority-via-command-line

http://gilchrist.ca/jeff/SetPriority/

https://www.tenforums.com/tutorials/89548-set-cpu-process-priority-applications-windows-10-a.html

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
相关产品与服务
云服务器
云服务器(Cloud Virtual Machine,CVM)提供安全可靠的弹性计算服务。 您可以实时扩展或缩减计算资源,适应变化的业务需求,并只需按实际使用的资源计费。使用 CVM 可以极大降低您的软硬件采购成本,简化 IT 运维工作。
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档