分享

windows系统下通过cmd命令查找某个进程的运行路径

 醉人说梦 2018-04-23

 我们常常需要知道运行的进程在哪个目录下。使用wmic非常方便,能够知道进程的详细信息。

例如:任务管理器中显示的进程名为c.exe.

查找路径方法是:打开cmd.exe,输入wmic ,然后输入process where(Description="c.exe")

wmic 作用总结:

一、查询数据

1 使用get查询

wmic process get name,executablepath


2 无条件查询

wmic process list brief

wmic process list full


3加where条件查询

wmic process where name="qq.exe" get processid,executablepath,name

会显示所有的同名进程,注意where条件在前面,要获取的属性在后面。

二、创建进程

wmic process call create  "c:\windows\system32\cmd.exe"


三、结束进程

wmic process where name="qq.exe" call terminate

wmic process where name="qq.exe" delete


转载自:http://blog.csdn.net/cfanzp/article/details/8825130

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多