使用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
例如:任务管理器中显示的进程名为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
相关文章推荐
- 在Linux下获取当前运行程序可执行文件全路径(不使用real_path()函数)
- C#获取当前程序运行路径的方法集合//获取当前进程的完整路径
- 使用C Run-Time 获取当前进程的路径
- EnumProcessModules 使用 获取进程的路径
- 获取当前进程目录 GetCurrentDirectory() 及 获取当前运行模块路径名GetModuleFileName()
- 使用Java获取windows进程的路径
- 2014-04-30工作日志:提取文件的路径及使用createprocess时,要用getmodulename获取要执行的模块的路径及调用createprocess时要记得关闭新建的进程
- 获取系统运行进程信息——PSAPI介绍使用
- 获取系统运行进程信息——PSAPI介绍使用 .
- 获取系统运行进程信息——PSAPI介绍使用
- c++获取进程的运行路径
- 使用ptrace向已运行进程中注入.so并执行相关函数
- 【Java 路径】运行可执行jar包获取相关路径
- System.UnauthorizedAccessException: 拒绝访问 temp 目录。用来运行 XmlSerializer 的标识“NT AUTHORITY\NETWORK SERVICE”没有访问 temp 目录的足够权限。CodeDom 将使用进程正在使用的用户帐户进行编译,这样,如
- java中获取运行路径
- 简单介绍Linux进程文件路径的获取方法
- C#获取运行程序的进程ID
- linux 获取程序运行的运行路径
- 获取进程全路径
- 利用GetProcessMemoryInfo 获取进程内存使用