A. The default WinPE 2004 installation doesn't support WMI, WSH, or ADO. To create a WinPE 2004 instance with these components, perform the following procedure. In this example, the base WinPE 2004 CD-ROM has been copied to a F:\temp\pe2004 folder.
- Use a command line to change to the folder that contains the WinPE CD-ROM (e.g., F:\temp\pe2004\winpe).
- Run the mkimg.cmd command, specifying the path for a Windows XP Service Pack 2 (SP2) installation (e.g., D: for the CD-ROM), the target folder to create, and the /wmi parameter, as this example shows:
mkimg.cmd y: f:\temp\pe2004wmi.tmp /wmi
- Run the buildoptionalcomponents.vbs command to create a structure that has the additional files needed for the WMI, WSH, and ADO components.
- Copy the content from the new component folder (F:\temp\peoptcomp) to your temporary WinPE build location (F:\temp\pe2004wmi.tmp). You can combine steps 3 and 4 if in step 3 you specify /d as the temporary WinPE build location. Then you don't need to manually copy the files.
- If you want to connect to a Microsoft SQL Server database, you need to copy two additional .dll files to the temporary WinPE build location. (You can find these files on any XP installation.) Assuming your temporary WinPE build location is f:\temp\pe2004wmi.tmp, copy the files to the following locations:
F:\temp\pe2004wmi.tmp\program files\common files\system\ole db\sqloledb.rll F:\temp\pe2004wmi.tmp\I386\system32\dbnmpntw.dll
- Edit startnet.bat in the \system32 folder of the temporary WinPE folder by adding an oc.bat line to the end file, as this sample startnet.bat file shows:
Buildoptionalcomponents.vbs /ado /hta /wsh /s:y: /d:f:\temp\peoptcomp
factory -winpe @echo off echo. echo. echo. echo. echo IMPORTANT-READ CAREFULLY: The Microsoft Windows Pre-Installation Environment echo (the "Software") is protected by copyright laws and international copyright echo treaties, as well as other intellectual property laws and treaties. The echo Software is licensed, not sold. In order to install and use the Software, you echo must have executed with Microsoft an appropriate license agreement ("License echo Agreement") for the Software. IF YOU HAVE NOT SIGNED A LICENSE AGREEMENT, echo YOU ARE NOT LICENSED TO INSTALL AND USE THE SOFTWARE. YOU MUST NOT echo INSTALL, COPY, echo OR USE THE SOFTWARE UNTIL A LICENSE AGREEMENT IS EXECUTED. echo. echo. echo You are permitted to remove this paragraph from the startnet.cmd, provided that echo you acknowledge and agree to the foregoing statements. echo. echo. echo. echo. oc.bat
You now have a flat-file WinPE instance that contains integrated WMI, WSH, and ADO components. You can use the WBEMTest utility to view WMI support in an installation (use the "Wnum Classes..." option with the cimv2 namespace) when you boot into this WinPE instance.
If you'll use WinPE with Microsoft Systems Management Server (SMS) OS Deployment Feature Pack, you need to copy the winbom.ini file, which by default is at the root of the WinPE temporary folder, to the \i386\system32 folder of your WinPE installation and add the "Quiet=Yes" line to the \[WinPE\] section of the file, as this example shows:
\[Factory\] WinBOMType=WinPE Reseal=No \[WinPE\] Restart=No Quiet=Yes \[PnPDriverUpdate\] \[PnPDrivers\] \[NetCards\] \[UpdateInis\] \[FactoryRunOnce\] \[Branding\] \[AppPreInstall\]
If you fail to update and copy the winbom.ini file when you boot to the custom WinPE installation, you'll be prompted during the installation for how you want to shut down the WinPE environment.
If you decide to integrate this WinPE installation into a Microsoft Remote Installation Services (RIS)-based environment, you need to ensure that the account that RIS uses doesn't have write access to the remote installation share because the first machine to boot will build its WMI repository and write it back to the RIS source, potentially rendering it unusable for other machines.