How to access the Disk volume information RRS feed

  • Question

  • Hi,

    I would like to get the Disk Management Properties.

    For example, In the Disk Management window I have system with 5 local drives called "C, D, E, F, G" na dhave the partition name as "Disc 0", Disc 1" and etc.

    Disc 0 Contains the Drives name "C:", "D:" and "E:"

    Disc 1 contains the Drives name "F:", "G:"

    I am expecting to get the Disc name along with drive information using .net program. Could you please help me to resolve this issue. I have attached one screen shot for more clarity...

    Awaiting for your reply.



    Disk Management Window

    Friday, January 3, 2014 3:21 PM


  • Use WMI to get the information you need.  MSDN has documentation for all the types you'll need.

    Win32_Volume contains a list of all the volumes on the machine. 

    Win32_DiskDrive contains the physical drives. 

    Win32_DiskPartition contains the partition information.  There is a separate class to hook the 2 together if you need it.

    Win32_LogicalDisk contains the logical drive information.  There is a separate class to hook this to a partition if you need it.

    You might consider using WMI Code Creator to help query WMI and generate the code you'll need based upon your specific requirements.

    Friday, January 3, 2014 7:53 PM

All replies