Is there any way to retrieve the following type of path:
有没有办法检索以下类型的路径:
\\?\Volume{GUID}\
for USB drives Using WMI?
用于USB驱动器使用WMI?
2 个解决方案
#1
In windows 2003 and above ( not XP !) you can use: Win32_Volume Class.
在Windows 2003及更高版本(不是XP!)中,您可以使用:Win32_Volume Class。
I don't think there is a way to retrieve the guid with wmi in xp and below. Can't be sure.
我不认为有一种方法可以在xp及更低版本中使用wmi检索guid。不能确定。
albert refers to the GetVolumeNameForVolumeMountPoint call. There is a sample in the link.
albert指的是GetVolumeNameForVolumeMountPoint调用。链接中有一个示例。
#2
You can fetch this Information from Sytem Registry. Reading System Registry (both local and Remote) is Possible through WMI using the StdRegProv provider.
您可以从Sytem Registry获取此信息。使用StdRegProv提供程序通过WMI可以读取系统注册表(本地和远程)。
#1
In windows 2003 and above ( not XP !) you can use: Win32_Volume Class.
在Windows 2003及更高版本(不是XP!)中,您可以使用:Win32_Volume Class。
I don't think there is a way to retrieve the guid with wmi in xp and below. Can't be sure.
我不认为有一种方法可以在xp及更低版本中使用wmi检索guid。不能确定。
albert refers to the GetVolumeNameForVolumeMountPoint call. There is a sample in the link.
albert指的是GetVolumeNameForVolumeMountPoint调用。链接中有一个示例。
#2
You can fetch this Information from Sytem Registry. Reading System Registry (both local and Remote) is Possible through WMI using the StdRegProv provider.
您可以从Sytem Registry获取此信息。使用StdRegProv提供程序通过WMI可以读取系统注册表(本地和远程)。