When creating both x86 and x64 Windows PE images, provide both x86 and x64 version of any tools that will be used. MDT 2008 provides a method to add additional file to the Windows PE image using the Extras folder which is configured on the Windows PE tab of the deployment point properties dialog
There is only one folder that can be specified. 64 bit Windows PE has no 32 Bit WOW subsystem, tool executables for each architecture must be provided.
Here is a one line batch file that solves the problem:
Here are the steps to make makecab.exe available in Windows PE:
- Create an Extras folder add the path to the deploy point configuration. i.e. e:\Extras
- Create the e:\Extras\tools folder
- Create e:\Extras\tools\amd64 and e:\tools\x86
- Obtain 32 and 64 bit copies of makecab and place then in the correct folder.
- Create e:\Extras\Windows and e:\Extras\Windows\System32
- Create e:\Extras\Windows\System32\makecab.cmd and add the single line @%SystemDrive%\tools\%PROCESSOR_ARCHITECTURE%\%~n0.exe
- Use the MDT console and update the deployment point to create a new WIM and ISO
How it works
Anything added to the Extras folder goes into the root of the WIM and thus the root of X: when the WIM is booted. The Processor_Architecture variable will contain the value amd64, x86, or IA64 (Note: MDT does not support IA64). In a batch file the variable %0 is the name of the batch file. the prefix ~n modifies the variable %0 to by dropping the extension. So in the example, the line in the batch file expands to x:\tools\amd64\makecab.exe in 64 bit Windows PE and x:\tools\x86\makecab.exe in 32 bit Windows PE.
- When copying executables into tools\amd64 or tools\x86 make sure you copy all the required support files including any required MUI folders.
- Make sure that the tool is referenced by its basename i.e. makecab not makecab.exe
- Make sure the 64 bit tools folder is named amd64 not x64.
This post was contributed by Dave Hornbaker a senior consultant with Microsoft Services – U.S. East Region.