How to specify a boot.wim to be used as the template PE image by MDT when creating Lite Touch PE image?

Answered How to specify a boot.wim to be used as the template PE image by MDT when creating Lite Touch PE image?

  • Thursday, December 06, 2012 2:41 PM
     
     

    Can anyone tell me: 
    How to specify a boot.wim to be used as the template PE image by MDT when creating Lite Touch PE boot image?
    Or the question can be said as: how to make MDT use a specific boot.wim when MDT creates Lite Touch PE?
    Don't let MDT search and determie available WinPE imageto use as template in creating Lite Touch PE by itself.
    Thank you!



    • Edited by Long Bo Thursday, December 06, 2012 2:46 PM
    • Edited by Long Bo Thursday, December 06, 2012 2:50 PM
    • Edited by Long Bo Thursday, December 06, 2012 2:54 PM
    • Edited by Long Bo Friday, December 07, 2012 12:54 AM
    •  

All Replies

  • Thursday, December 06, 2012 3:56 PM
     
     
    Not sure wht you ar etrying to do.  Are you trying to create a bootable device? or boot menu? WinPE is share specific, and by default points to the share it was created on.
  • Thursday, December 06, 2012 9:55 PM
     
     

    No, he wants to specify the original boot.wim that MDT uses as a template when it creates the LiteTouchPE_*.wim files. I''m not sure where that comes from, and obviously there is logic to determine if you are starting out with x86 or x64. Probably somewhere in \Program files\Microsoft Deployment Toolkit\* that's where a lot of the config files are read from.

    I do some on-the-fly customizations of the LiteTouch wims registry when they get created by using an updateExit.vbs script in the:

    \Program files\Microsoft Deployment Toolkit\Samples folder.

    It would be convenient to modify the base wim, but I never figured out how it decides. What happens is the wim gets mounted to a temp location referenced by the %CONTENT% variable, which I then use as a base path to open the registry and make changes.

    Here I'm adding support for the McAfee Safeboot encryption filter drivers, so they are available in WinPE. I add the driver files using the Extra folder as you normally would, but I suppose you could do it in the script as well.

    '==========

    Option Explicit

    Dim oShell, oEnv

    ' Write out each of the passed-in environment variable values

    Set oShell = CreateObject("WScript.Shell")
    Set oEnv = oShell.Environment("PROCESS")

    WScript.Echo "INSTALLDIR = " & oEnv("INSTALLDIR")
    WScript.Echo "DEPLOYROOT = " & oEnv("DEPLOYROOT")
    WScript.Echo "PLATFORM = " & oEnv("PLATFORM")
    WScript.Echo "ARCHITECTURE = " & oEnv("ARCHITECTURE")
    WScript.Echo "TEMPLATE = " & oEnv("TEMPLATE")
    WScript.Echo "STAGE = " & oEnv("STAGE")
    WScript.Echo "CONTENT = " & oEnv("CONTENT")

    ' Do any desired WIM customizations (right before the WIM changes are committed)

    If oEnv("STAGE") = "WIM" Then

    ' CONTENT environment variable contains the path to the mounted WIM

    Dim sCmd, rc, strLog, fso, filetxt

    Set fso = CreateObject("Scripting.FileSystemObject")
    Set filetxt = fso.CreateTextFile(oEnv("DEPLOYROOT") & "\boot\UpdateExitLog_" & oEnv("ARCHITECTURE") & ".txt", True)

        strLog = strLog & "---- Beginning UpdateExit.vbs WIM section ----" & vbCrLf
        strLog = strLog &  "Adding Safeboot Registry keys to WinPE (UpdateExit.vbs)..." & VbCrLf

        'Load SYSTEM registry hive from mounted WinPE WIM (path to CONTENT)
        sCmd = "Reg load HKLM\winpe " & oEnv("CONTENT") & "\Windows\System32\config\SYSTEM"
        strLog = strLog &  "About to run command: " & sCmd & VbCrLf
        rc = oShell.Run(sCmd, 1, True)
        strLog = strLog &  "REG LOAD rc = " & rc & VbCrLf
        
        sCmd = "Reg add HKLM\winpe\ControlSet001\services\Safeboot /f"
        strLog = strLog &  "About to run command: " & sCmd & VbCrLf
        rc = oShell.Run(sCmd, 1, True)
        strLog = strLog &  "REG add rc = " & rc & VbCrLf
        
        sCmd = "Reg add HKLM\winpe\ControlSet001\services\SBAlg /f"
        strLog = strLog &  "About to run command: " & sCmd & VbCrLf
        rc = oShell.Run(sCmd, 1, True)
        strLog = strLog &  "REG add rc = " & rc & VbCrLf

        sCmd = "Reg add HKLM\winpe\ControlSet001\services\MfeEpePc /f"
        strLog = strLog &  "About to run command: " & sCmd & VbCrLf
        rc = oShell.Run(sCmd, 1, True)
        strLog = strLog &  "REG add rc = " & rc & VbCrLf
        
        sCmd = "Reg add HKLM\winpe\ControlSet001\services\MfeEEAlg /f"
        strLog = strLog &  "About to run command: " & sCmd & VbCrLf
        rc = oShell.Run(sCmd, 1, True)
        strLog = strLog &  "REG add rc = " & rc & VbCrLf
        
        sCmd = "Reg import " & oEnv("DEPLOYROOT") & "\Scripts\SBWinPE.reg"
        strLog = strLog &  "About to run command: " & sCmd & VbCrLf
        rc = oShell.Run(sCmd, 1, True)
        strLog = strLog &  "REG import rc = " & rc & VbCrLf
        
        sCmd = "Reg unload HKLM\winpe"
        strLog = strLog &  "About to run command: " & sCmd & VbCrLf
        rc = oShell.Run(sCmd, 1, True)
        strLog = strLog &  "REG unload rc = " & rc & VbCrLf

        filetxt.Write(strLog)
        filetxt.Close

    End If

    '== end script ==

  • Thursday, December 06, 2012 10:32 PM
     
     Proposed Answer

    Open up C:\Program Files\Microsoft Deployment Toolkit\Bin\DeploymentTools.xml

    and you'll see

    <tool name="winpe.wim">

    %ADKPath%\Windows Preinstallation Environment\%RealPlatform%\en-us

    </tool>

    I'm sure you can work out the rest :)

    • Proposed As Answer by Amnon Feiner Friday, December 07, 2012 12:20 AM
    •  
  • Thursday, December 06, 2012 11:19 PM
     
     
    What Andrew said.  You may be swimming into the waters of the unsupported tough.
  • Thursday, December 06, 2012 11:44 PM
     
     
    You may be swimming into the waters of the unsupported tough.
    All the fun parts of MDT are though ;)
  • Friday, December 07, 2012 1:39 AM
     
     

    Thx!

    But the question is way the system varible %WAIK% had not been created by AIK installation.
    I can not find the varible here like the screenshot below, so I just can manully add the item.

  • Friday, December 07, 2012 3:05 AM
     
     

    Although I added the varible %WAIKPath%,  then logged off and logged on. And I have done a CMD test and ensure that the varibile can be recognized by OS.

    But when completely re-gerating the Lite Touch PE, C:\Program Files\Windows AIK\Tools\%architechture%\winpe.wim weren't be used yet.


    • Edited by Long Bo Friday, December 07, 2012 4:38 AM
    •  
  • Friday, December 07, 2012 5:48 AM
     
     
    May I ask what the reason you want to do this is?
    Seems to me that you want to avoid the time regenerating boot images after you modify your deployment share. It is recommended that you only inject network and storage drivers that exist in the computer models in your organization, AND is not recognized by WinPE.
  • Friday, December 07, 2012 6:12 AM
     
     
    No, I do this just because I want MDT to use the PE image of AIK, not use boot.wim of a Windows 7 installation DVD, when MDT generating Lite Touch PE.
  • Friday, December 07, 2012 7:05 AM
     
     Answered

    I would be very interested to know what you can benefit from this, however as a workaround you can delete the OS in the deployment workbench and import only sources\install.wim from win 7 DVD disc. That leaves WinPE from WAIK the only candidate.
    I guess MDT decided to use boot.wim from Win 7 DVD disc because it has a higher version, it is Win 7 SP1 DVD, right? WAIK comes without SP1. You can install AIK Supplement for Win 7 SP1 here. However in my lab environment, if you provide MDT with WAIK with SP1/Win 7 SP1, boot.wim from OS DVD is still preferred, if you provide MDT with ADK/Win 8, WinPE image from ADK is preferred. I don’t know if there is any documentation about this, any thoughts?

    Regards.

    • Marked As Answer by Long Bo Friday, December 07, 2012 8:30 AM
    •  
  • Thursday, December 13, 2012 7:12 AM
     
     Proposed Answer

    Hi Long Bo,

    I had the same problem. To solve this, I had to change the 'Settings.xml' file in the MDT-Deployment share and there under 'Control'.

    In that file you will find all setting which will used to create the LiteTouchPE wim file.

    For this issue you have to change:

    <Boot.x86.UseBootWim>True</Boot.x86.UseBootWim>
    <Boot.x64.UseBootWim>True</Boot.x64.UseBootWim>

    Change 'True' to 'False' and your problem should be solved. Actually it solved my issue.

    • Proposed As Answer by Sven Podewils Thursday, December 13, 2012 7:59 AM
    • Unproposed As Answer by Sven Podewils Thursday, December 13, 2012 8:00 AM
    • Proposed As Answer by Sven Podewils Thursday, December 13, 2012 9:48 AM
    •