Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- string deviceid = "Disk #0, Partition #0";
- string antecedent = @"\" + Environment.MachineName + "\root\cimv2:Win32_DiskPartition.DeviceID="" + deviceid + """;
- ManagementObjectSearcher assosiaciation_query2 = new ManagementObjectSearcher("select Dependent from Win32_LogicalDiskToPartition where Antecedent = "" + antecedent + """);
- foreach (ManagementObject assosiaciation_query_data2 in assosiaciation_query2.Get())
- {
- Console.WriteLine("Dependent: " + assosiaciation_query_data2["Dependent"]);
- }
Add Comment
Please, Sign In to add comment