Tuesday, September 17, 2013

Boot Image Templates (Part 2)

Now that you have had some time to digest Boot Image Templates (Part 1), it is time to focus on Feature Packs.

Feature Packs have a few different names.  In the Deployment Workbench (MDT), they are referenced as "Feature Packs".  In the Boot Image Template XML files they are "Components".  These "Components" are actually part of ADK (Assessment and Deployment Toolkit), or AIK (Automated Installation Kit), where they are referenced as OC's (Optional Components).  And finally in DISM, they can be installed with the /Add-Package command.

I almost forgot, they are also referenced as Feature Names.

If you roll on over to C:\Program Files\Microsoft Deployment Toolkit\Bin and open a file called FeatureNames.xml some things will start to make more sense.  In this XML file you will see a "feature id=" with some cool names like winpe-mdac or winpe-hta.  These names correspond with ADK Packages in the following two directories
"C:\Program Files (x86)\Windows Kits\8.0\Assessment and Deployment Kit\Windows Preinstallation Environment\x86\WinPE_OCs"
"C:\Program Files (x86)\Windows Kits\8.0\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs"

In these directories you will find the Packages (CAB) that are installed by MDT in the Boot Images.

The first thing you should do is make a backup copy of this file.  So create a copy in this directory as FeatureNames.xml.default.

What you realize is that there is also an option="exclude" entry in this XML file that corresponds with MDT.  Any entry in this XML file that has the "exclude" option, is not displayed in the Deployment Share Properties.  Let's have a look . . .


So where we are going with is that maybe, just maybe there are some Feature Packs / Feature Names / OC's that I know I will never implement in a Boot Image, so why not exclude these from MDT.  In my FeatureNames.xml I have the following lines (10-15)

<feature id="winpe-fontsupport-ja-jp">Japanese (JA-JP) language pack</feature>
<feature id="winpe-fontsupport-ko-kr">Korean (KO-KR) language pack</feature>
<feature id="winpe-fontsupport-zh-cn">Chinese (ZH-CN) language pack</feature>
<feature id="winpe-fontsupport-zh-hk">Chinese (ZH-HK) language pack</feature>
<feature id="winpe-fontsupport-zh-tw">Chinese (ZH-TW) language pack</feature>
<feature id="winpe-fonts-legacy">Legacy fonts</feature>

So if I change these from what is above, to the following:

<feature id="winpe-fontsupport-ja-jp" option="exclude">Japanese (JA-JP) language pack</feature>
<feature id="winpe-fontsupport-ko-kr" option="exclude">Korean (KO-KR) language pack</feature>
<feature id="winpe-fontsupport-zh-cn" option="exclude">Chinese (ZH-CN) language pack</feature>
<feature id="winpe-fontsupport-zh-hk" option="exclude">Chinese (ZH-HK) language pack</feature>
<feature id="winpe-fontsupport-zh-tw" option="exclude">Chinese (ZH-TW) language pack</feature>
<feature id="winpe-fonts-legacy" option="exclude">Legacy fonts</feature>

Then MDT will now look like so:


Looks much nicer and manageable for me to work with.

Spend some time reviewing the Feature Packs on Technet to understand what they are.  In my next post I will explain why other Feature Names are hidden, and how we separate Packs into separate Boot Images.

Wednesday, September 11, 2013

Boot Image Templates (Part 1)

So by now you have seen my last post of the release of my WinPE Menu.  Well before we get to using the WinPE Menu, we need to understand what we are trying to accomplish.
MDT allows for two types of Boot Images.  The first is LiteTouchPE.  This is the primary Boot Image, and it is what everyone uses for imaging computers.  The secondary Boot Image is called Generic.  If you build one, you will have a Command Prompt.  Close the Command Prompt and your computer will reboot.


I have never been a fan of the default naming convention of this screen, so let's make some modifications.  Change everything up to match the image below.


While you are at it, select x64 under the Platform drop down and make the changes in the image below.  Don't forget to clear the Custom background bitmap file and the Scratch space size.


Press Apply and OK.

Now back to the templates.  What we just did was to enable the creation of the Generic Boot Image.  We are not going to update the Deployment Share yet, so hold tight.

So here is how it works.  Let's assume we build a new LiteTouchPE Boot Image from scratch.  To determine what is installed in LiteTouchPE, MDT will gather information from the MDT Template LiteTouchPE.xml first.  This is the baseline. On a standard installation, this file will exist at:
C:\Program Files\Microsoft Deployment Toolkit\Templates\LiteTouchPE.xml

Here is what the standard MDT 2012 Update 1 LiteTouchPE.xml looks like.  Look it over.  If you have built a LiteTouchPE Boot Image, then you should recognize this content.  These are the base Deployment Scripts.


So let's break down the process.  When creating a Boot Image, this is the baseline.  After that, settings that are configured by the MDT Deployment Share in the Control\Settings.xml will populate the Settings Group.  There is no point in modifying these values as they are overwritten by the Deployment Share.  We'll cover that on another post soon enough.

The Components Group contains the Feature Packs (WinPE OC's).  By default we see that the following are installed on every LiteTouchPE Boot Image:
winpe-hta
winpe-scripting
winpe-wmi
winpe-securestartup
winpe-fmapi

In the Deployment Share properties, in the Feature Packs section, we do not have an option to install these components.  That is because they are identified in here already, so there is no need to give you the option to install these Feature Packs as they are installed by default.  Don't worry, I will a another write up on Feature Packs soon.

The Driver and Packages Group is populated automatically by our Selection Profile.  Nothing to hard code in here.

The Content Group contains all the Deployment Scripts and Tools.

The Exits Group contains a section for optional scripts to run when building the Boot Images.  This will be covered heavily in a separate post.

Now for a quick peek at the Generic Template.  That is called the Generic.xml.  Looking at this file it is easy to understand why this Boot Image launches a Command Prompt only.  That is because there is almost nothing in this Boot Image.


So we WANT our Generic Boot Image to have our Deployment Scripts installed and not just a Command Prompt.  So our goal for now is to mirror the files.

Replace Generic.xml
Copy C:\Program Files\Microsoft Deployment Toolkit\Templates\LiteTouchPE.xml to LiteTouchPE.xml.default.  Now we have two copies of LiteTouchPE.xml.  One we can modify, and one we can leave alone.
Rename C:\Program Files\Microsoft Deployment Toolkit\Templates\Generic.xml to Generic.xml.default
Copy C:\Program Files\Microsoft Deployment Toolkit\Templates\LiteTouchPE.xml and rename to Generic.xml

At this point we should have the following Template files:
 C:\Program Files\Microsoft Deployment Toolkit\Templates\LiteTouchPE.xml
 C:\Program Files\Microsoft Deployment Toolkit\Templates\LiteTouchPE.xml.default
 C:\Program Files\Microsoft Deployment Toolkit\Templates\Generic.xml
 C:\Program Files\Microsoft Deployment Toolkit\Templates\Generic.xml.default

So at this point, if we were to update our Deployment Share in MDT and Regenerate the Boot Images, then we will have two identical Boot Images for LiteTouchPE and Generic since they are using the LiteTouchPE Templates for both.  Keep in mind if we are going to integrate the WinPE Menu in the Generic Boot Image, then this is what we have to do.

Time to stop here for now and move onto Feature Packs in my next post.

WinPE Menu on Codeplex

Well I finally got around to posting my custom WinPE Menu.  You can find it on Codeplex for the Source Code and some simple instructions.  Full instructions will be posted over the next few days, as well as some additional Plugins to add additional functionality.

Note that this has been tested on WinPE 3 and WinPE 4 . . . now that Windows 8.1 is out, I will have to do some testing to see how it works with the updated bits.

More to come.  David