Link to home
Start Free TrialLog in
Avatar of DjDezmond
DjDezmondFlag for United Kingdom of Great Britain and Northern Ireland

asked on

VbScript solution... Query partition mount points on Windows 2000?

I am currently using the WMI to query partition information about the local drive, but am struggling to find a way to get the Mount Point of a partition if it doesn't have a drive letter assigned.

It appears that there are 3 main WMI classes that deal with local drive partitions...
Win32_DiskPartition
Win32_LogicalDisk
Win32_LogicalDiskToPartition

The only class to return free space information is LogicalDiskToPartition, but this doesn't detect partitions that aren't assigned a drive letter.

We have partitions that have mount points instead of drive letters, and i need to interrogate these. Does anyone have any information regarding any other classes or methods i could use to loop through each partition on a machine taking free space, mount path (or driver letter) and volume name information as i go?

There is a Win32_Volume and Win32_MountPoint class in Windows 2003 and later... why did they wait this long to release them!?

Any help will be much appreciated.

Thanks,
Dez
Avatar of SysExpert
SysExpert
Flag of Israel image

Isn't the info available in the Disk manager ?

If so, you should be able to access it somehow.

Other option is to run a batch file that simply does a DIR
of each partition to a text file, and pull the info out.

I hope this helps !
Avatar of DjDezmond

ASKER

Thanks, but that wouldn't work as some of the partitions might be hidden, or without drive letters.

I think i just have to except that i wont be able to programmatically do this without using 3rd party tools.
ASKER CERTIFIED SOLUTION
Avatar of SysExpert
SysExpert
Flag of Israel image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Yea ive used PQDisk to log a simple show command... im now splitting the log file up to extract the info i need... seems to be doing the trick.

Ill accept your solution, although it wasn't what i did in the end... but thanks for your help all the same!

Dez