I have been working on a project that runs in the Win7 PE environment. I have found that the WMI provider does not return results for the Win32_DiskPartition class or classes that reverence this class (Logical Partition to Volume). It does return values for other objects/classes.
I have added the WMI package to the WinPE environment. Under the Vista PE environment, this function works as expected. I also noticed that wbemtest runs but does not display it's UI under the new PE environment.
In trying to resolve this, I added all packages to WinPE with no success. I then copied the c:\windows\system32\wbem folder from an installed Win7 system to the WinPE environment, this did work. Wbemtest also works with the full version copied.
So, I guess I have a few questions. Is this class an intentional omission from WinPE or is this a mistake. Are there any issues, other than size, that using the wbemtest from the full OS would cause? Is there a list somewhere that shows all the classes that WinPE will not support?
I can confirm that I too came across this issue as well in WinPE 3.0 (using the RTM Windows 7 AIK). While it was frustrating, your solution of copying the wbem folder from a Windows 7 image worked great for me and fixed my PE application, which depends on Win32_DiskPartition for data. Thanks for the tip. It makes the WIM slightly larger, but at least it works. Microsoft, why did you leave this out?
i have an issue with the win32_networkadapter class. It does exist under WinPE 3.0 but not all properties are filled. In my vbscript i check if the adaptertypeid is 2. I wanted to try your solution, but when i mount the image and xcopy the W7 wbem folder i get a lot off access denied errors. When i boot with WinPE the property stiil gets no value. With WinPE 2.0 the same scripting works just fine.
I just ran into the same thing after I upgraded to the latest version of Microsoft WAIK. I'm not sure why, but different permissions are applied to the WBEM folder, causing access denied errors. To get around this, you need to take ownership of the files and grant full rights to administrators:
TAKEOWN /F <mountdir>\windows\system32\wbem /A /R icacls <mountdir>\windows\system32\wbem /grant Administrators:F /T
TAKEOWN twill take ownership of the existing WBEM directory and its files.
icacls grants full rights to the administrators group on the existing WBEM directory and its files.
What a PITA...
I had the same issue with wmic not working. So I also installed the wmi package into my PE3 and then did the trick of copying in a c:\windows\system32\wbem folder from an existing Windows 7 (32bit) system.
However, even after doing that, if I use wmic from PE3 (I use the command "wmic systemenclosure get chassistypes" and "wmic baseboard get manufacturer") all I get for the output is an error that says:
Description = Invalid class string
What am I missing?