I need to access to a WMI class called "Win32_LogicalDiskToPartition". I can access to this class in many windows (XP/7/8/8.1), but I found a particular Windows 8.1 where this class is not accessed.
To test this I use Powershell, this commnad returns "invalid class" in the windows 8.1 with the problem.
Get-WmiObject Win32_LogicalDiskToPartition
I need to access to this class in a c# application. The code used to access to this class is:
ManagementObjectSearcher searcher1 = new ManagementObjectSearcher("SELECT * FROM Win32_LogicalDiskToPartition");
foreach (ManagementObject dm in searcher1.Get())
{
}
The point is that I check the consistency of the repository with this:
C:\Windows\system32>winmgmt /verifyrepository
The return message is this in the laptop problem:
WMI repository is consistent