查询获取其他进程的进程当前目录 [英] Query regarding getting process current directory of other process

查看:94
本文介绍了查询获取其他进程的进程当前目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我有关于获取其他进程的进程当前目录(而不是imagepath)的查询,我正在尝试使用类"Win32_Process"获取WMI查询。 ,但是没有表示当前目录的属性,是否有任何其他WMI类,
可以给我当前目录?



谢谢,

Sachin


解决方案

Hi Shinde_Sachin,


感谢您在这里发帖。


>>我有关于获取其他进程的进程当前目录(而不是imagepath)的查询,我正在尝试使用类获取WMI查询; Win32_Process",但是没有表示当前目录的属性,是否还有其他
WMI类可以给我当前目录?


对于这种情况,我建议你使用Win32_Directory类。


Win32_Directory WMI类表示运行Windows的计算机系统上的目录条目。 WMI使用Win32_Directory类来管理文件夹。值得注意的是,此类中可用的属性和方法与CIM_DataFile类(用于管理文件的类)中可用的属性和方法
相同。这意味着在您学习了如何使用WMI管理文件夹之后,您将无需任何额外工作就知道如何管理文件。您可以使用Win32_Directory检索文件系统中任何文件夹
的属性。类。要检索单个文件夹的属性,请为Win32_Directory类构造Windows查询语言(WQL)查询,确保包含该文件夹的名称。


有关详细信息,请请参阅此文档。


https://msdn.microsoft.com/en-us/library/aa394130%28v=vs.85%29.aspx?f=255&MSPPError=-2147217396


希望这可以帮到你。


最好的问候,

Sera Yu


Hi,

I have query regarding getting process current directory(not imagepath) of other process, I am trying to fetch WMI query with class "Win32_Process", but there is no attribute which representing Current directory, Is there any other WMI class which can give me current directory?

Thanks,
Sachin

解决方案

Hi Shinde_Sachin,

thanks for posting here.

>>I have query regarding getting process current directory(not imagepath) of other process, I am trying to fetch WMI query with class "Win32_Process", but there is no attribute which representing Current directory, Is there any other WMI class which can give me current directory?

For this case, I suggest you use Win32_Directory class.

The Win32_Directory WMI class represents a directory entry on a computer system running Windows. WMI uses the Win32_Directory class to manage folders. Significantly, the properties and methods available in this class are identical to the properties and methods available in the CIM_DataFile class, the class used to manage files. This means that after you have learned how to manage folders using WMI, you will, without any extra work, also know how to manage files. You can retrieve the properties of any folder in the file system using the Win32_Directory class. To retrieve the properties for a single folder, construct a Windows Query Language (WQL) query for the Win32_Directory class, making sure that you include the name of the folder.

For more information, please refer to this document.

https://msdn.microsoft.com/en-us/library/aa394130%28v=vs.85%29.aspx?f=255&MSPPError=-2147217396

Hope this could be help of you.

Best Regards,
Sera Yu


这篇关于查询获取其他进程的进程当前目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆