How can I get the GUI volume IDs using WMI?

Is there a way to get the following type of path:

\\? \ Volume {GUID} \

for USB Drives Using WMI?

+1


source to share


2 answers


On Windows 2003 and up (not XP!) You can use: Win32_Volume class .

I don't think there is a way to get the guid with wmi in xp and below. Not sure.



albert refers to a call to GetVolumeNameForVolumeMountPoint . There is a sample in the link.

+1


source


You can get this information from the Sytem Registry. Reading the system registry (both local and remote) is possible through WMI using the StdRegProv provider.



0


source







All Articles