gbako Posted April 26, 2010 Posted April 26, 2010 How does one (successfully) install WMIC into WinPE? I have tried to install wmic into both PE20 (Vista's PE) and PE30 (Win7's PE) with no success.On both versions I found instructions on how to install the WMI package, and on both versions I was successful with this, but even after doing so, wmic does not work. I get error messages when using the app instead of the output I need.I found an article on Technet where somebody has the same problem, and somebody replied a trick to fixing this (for WinPE3) was to copy the entire "c:\windows\system32\wbem" into your PE install, thus overwriting all the files that were in PE. Problem with idea, is that it does not fix anything.If anybody has any ideas, I would greatly appreciate it. It does not matter if there is a solution for WinPE2 or WinPE3, either one is fine with me.What I need WMIC.exe to work for is I need a WinPE CD to boot, and use wmic.exe to determine the type of hardware the system is running on, and then have a script make decisions based on the hardware you just booted on. This seems so simple, but without wmic.exe working, I'm stuck!Thanks guys for any help you might be able to provide.The article for installing a package into PE2 is here:http://technet.microsoft.com/en-us/library/cc709665%28WS.10%29.aspxThe article for installing a package into PE3 is here:http://technet.microsoft.com/en-us/library/dd799312%28WS.10%29.aspxProblem is neither one of these articles was helpful, because while they do easily walk you thru the process of installing a package into PE2 or PE3, neither one explains why after you are done, wmic still does not properly work (even though the package install 100% successfully on both versions of PE)George
Tripredacus Posted April 27, 2010 Posted April 27, 2010 WMIC may make things easier, but if you have the Scripting package installed, you can use VBScript to work with the WMI.
gbako Posted April 28, 2010 Author Posted April 28, 2010 WMIC may make things easier, but if you have the Scripting package installed, you can use VBScript to work with the WMI.Thanks, but I've already written several DOS batch files that rely wmic.exe, so I would like to stick with wmic.exe
uid0 Posted April 29, 2010 Posted April 29, 2010 If it's bios info you need, you could try dmidecode:http://www.msfn.org/board/information-without-t85667.html
jaclaz Posted April 29, 2010 Posted April 29, 2010 From here:http://www.boot-land.net/forums/index.php?showtopic=9401you should be able to get a reference for the dependencies. What happens if you just open a command prompt and run in it:WMICWhich exact error are you getting?On a normal build the first time WMIC is run it "installs itself"Is the WINMGMT service started (or can it be started)?jaclaz
gbako Posted April 30, 2010 Author Posted April 30, 2010 From here:http://www.boot-land.net/forums/index.php?showtopic=9401you should be able to get a reference for the dependencies. What happens if you just open a command prompt and run in it:WMICWhich exact error are you getting?On a normal build the first time WMIC is run it "installs itself"Is the WINMGMT service started (or can it be started)?jaclazThe error I get in PE2 (Vista SP1's PE) is:ERROR:Code = 0x80040154Description = Class not registeredFacility = InterfaceIf I use WinPE3 (Win7's PE), the error I get is:ERROR:Description = Invalid class stringThats it. On both,the command I type in at the X:\ prompt is:wmic csproductI use several other commands via wmic, but they all provide the exact error.Nwo on both PE2 and PE3 I installed the WMI package, so the problem isn't that WMIC is missing. I found an article on technet where people had the same problem with PE3 (Win7's PE), and one person's solution was to take the entire C:\Windows\System32\wbem folder from Windows 7 and copy it into PE3's X:\Windows\System32\Wbem (in other words, overwriting the files in PE with the ones from Win7). I did this trick, and did nothing at all.I don't know what else to do. It's a bit frustrating, as I'm not sure why this is ending up to be such a big deal to install!Thanks for any help guys!George
Flip1001 Posted May 1, 2010 Posted May 1, 2010 wmic csproduct list /format:list works for me in both Win7(my computer) and WinPE 3.0 (in VirtualBox). Did you completely install WMI? Here is what I installed in my WinPE.dism /image:C:\winpe_x86\mount /Add-Package /PackagePath:"C:\Program Files\Windows AIK\Tools\PETools\x86\WinPE_FPs\winpe-scripting.cab"dism /image:C:\winpe_x86\mount /Add-Package /PackagePath:"C:\Program Files\Windows AIK\Tools\PETools\x86\WinPE_FPs\en-us\winpe-scripting_en-us.cab"dism /image:C:\winpe_x86\mount /Add-Package /PackagePath:"C:\Program Files\Windows AIK\Tools\PETools\x86\WinPE_FPs\winpe-wmi.cab"dism /image:C:\winpe_x86\mount /Add-Package /PackagePath:"C:\Program Files\Windows AIK\Tools\PETools\x86\WinPE_FPs\en-us\winpe-wmi_en-us.cab"
gbako Posted May 6, 2010 Author Posted May 6, 2010 Make_PE3 program will create PE with WMIC support.Thanks for help guys. I found the issue was you needed more packages installed than just wmi and scripting.I ended up also install the following packages:XMLMDACHTASo I basically installed 5 packages into PE (I used PE 2.1)I doubt all 3 of these were needed, but with them installed wmic works correctly! I'm too lazy to go back right now and figure out which of these 3 packages is actually needed, but I will eventually. But for now, if you install the following 5 packages total under PE2, then wmic.exe will finally work correctly:wmiscriptingXMLMDACHTA
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now