您的位置:首页 > 其它

使用wmic获取运行中进程的路径

2013-04-19 17:01 2651 查看
我们常常需要知道运行的进程在哪个目录下。使用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://hi.baidu.com/escortmnm/item/87d3f8625386b72369105bd9
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: