WMI partition-related stuff RRS feed

  • Question

  • Which forum deals with WMI and partitions? (E.g. given a WIN32_DiskPartition object, how to perform queries on that object)?
    Tuesday, November 3, 2009 6:03 AM


All replies

  • Hello,

    Thank you for your post.
    You can find those stuff here:

    For forum kindly provide some more details of the problem you are having the problem with so that we can direct you to teh relevent forum.

    Thanks & regards,
    Ashawani Tier 2 Application Support Server and Tools Online Engineering Live Services Team
    Tuesday, November 3, 2009 9:31 AM
  • What I'm trying to do is to get a list of all the partitions in the system.


    partition_list (WIN32_Disk d) {
    vector q;
    vector ext;
    for (i = 0; i < partitions; i++) {
     WIN32_DiskPartition p = WIN32_DiskPartition(d, i);
     if (p.type = PARTITION_EXTENDED)
    for (i = 0; i < ext.length; i++)
    return q;

    Is there a WMI method that works for extended partitions (since this is only necessary for MBR disks, I could just open the partition and read the extended superblock)?
    Also, can WMI handles be used with CreateFile or is there a method in WIN32_DiskPartition named DeviceID or similar?
    Tuesday, November 3, 2009 3:08 PM