Jump to content

- - - - -


  • Please log in to reply
No replies to this topic

#1 FerrariGuy



  • Members
  • 50 posts
  • Location:South Carolina
    United States

Posted 24 August 2011 - 01:47 PM

Posted Image

File Name: WMISupportScript
File Submitter: FerrariGuy
File Submitted: 24 Aug 2011
File Category: System scripts

My first script posting! I hope this will be usefull for folks and hope that it can be improved on.

This is a script to add WMI to your x86 WAIK 3.1 build using Win7_PE_SE. The script may work in other situations (x64 / PE3.0) but it has not been tested in these situations yet.

The script adds WMI by using DISM to install the WMI CAB package from WAIK into your %BootSrc% (which means it needs to be writable).
Installing the CABs in PE isn't enough to fully activate WMI in PE. all of the DLL's in WBEM must be registered, and all of the *.MOF;*.MFL files must be compiled by MofComp. This script creates a CMD file run via winpeshl.ini to do just that.

Why add WMI? Adding WMI gives the builder tremendous additional resources to use when running VBS scripts or Power Shell scripts within PE. WMI, for example, is one package required if one also wishes to take the Light Touch deployment utilities from a PE CD created by the Microsoft Deployment Tookit 2010 (MDT2010) and intigrate it into a custom PE.

WMI Tools / CIM Studio: What's this? Really it's a debugging tool for those who want to develop scripts that use WMI in PE. See: http://www.microsoft...s.aspx?id=24045

Special Note: Some builders might change the name of the "Computer" in PE after boot. WMI must be re-compiled in order to understand the change. My "Name Change" script (specialized for my work environment and not generally applicable)I wrote for my workplace runs the following two lines after changing the computer name in PE:

X:\Windows\System32\WBEM\WinMgmt.exe /resetrepository
X:\Windows\system32\WBEM\RegisterWMI.cmd <--- The registration & mof compilation cmd file created by this script.

Click here to download this file

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users