tags:

views:

1089

answers:

2

Is there any way to retrieve the following type of path:

\\?\Volume{GUID}\

for USB drives Using WMI?

+1  A: 

In windows 2003 and above ( not XP !) you can use: 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.

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

Igal Serban
A: 

You can fetch this Information from Sytem Registry. Reading System Registry (both local and Remote) is Possible through WMI using the StdRegProv provider.

Pratheeswaran.R