Example of Substitution

If you want to see how substitution works, you can review the following example which will show how the JoinDomain attribute gets changed from “anything” in the filename.XML file to “VistaTeam” in the unattend.xml file.

Note: Code that appears within <> should appear all on one line in the *.XML file.

  1. Locate the appropriate unattend*.xml and substitutes files for your operating system, target device architecture, and deployment method. These files are located under samples\ on the ImageCapture CD.
  2. Make a copy of the unattend*.xml file, and name it filename.XML, where filename matches the name of your .WIM file. Store the copy in the same directory as your .WIM file.
  3. Make a copy of the substitutes file, and name it filename.SUB. Store the copy in the same directory as your .WIM file.

    You should now have the following three files in one directory:

  4. Locate the XML element for JoinDomain in the filename.XML file. It should look similar to this example:

    <?xml version="1.0" encoding="utf-8"?>

    <unattend xmlns="urn:schemas-microsoft-com:unattend">

    <settings pass="specialize">

    <component name="Microsoft-Windows-UnattendedJoin" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35"
    language="neutral"
    versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

    <Identification>

    <JoinDomain>anything</JoinDomain>

    </Identification>

    </component>

    </settings>

    <cpi:offlineImage cpi:source="wim://hpfcovcm/c$/vista_inst/vista.wim#Windows Vista ULTIMATE" xmlns:cpi="urn:schemas-microsoft-com:cpi"/>

    </unattend>

  5. Modify the following XPATH element in the filename.SUB file. Note that this XPATH element appears on a single line in the filename.SUB file.

    //un:settings[@pass='specialize']//un:component[@name=Microsoft-Windows-UnattendedJoin'][@processorArchitecture='x86']/un:Identification/un:JoinDomain,VistaTeam

During deployment of the operating system, the filename.SUB and filename.XML files will be combined to create an unattend.xml file that is used to provide information during all phases of the Windows setup. In this example, the JoinDomain attribute will be set to VistaTeam.


© 2003 - 2012 Hewlett-Packard Development Company, L.P.