none
Inject drivers - difference between selection profile and ztidrivers RRS feed

  • Question

  • Greetings,

      I loaded the standard server task sequence in MDT 2012 (Update 1). In the PreInstall phase there is an Inject Drivers step which allows me to select a Selection profile. In the PostInstall phase, there is an Inject Drivers step, but this doesnt allow me to select a profile - it calls ztidrivers.wsf. Why do these two steps with the same name do different things? Can I delete the postinstall ztidrivers and add a proper Inject drivers step with a selection profile?

    Thanks

    David Z

    Tuesday, August 6, 2013 12:06 AM

Answers

  • David, your assumption is close. The pre-install ztidrivers.wsf stages the drivers, matching it by the PnP ID and/or your selection profile, and the post-install actually injects the drivers into the OS, forcing the OS to use the drivers that you selected in MDT (the drivers you choose) and not any "generic "drivers that may already be present in the OS. The injection is important because if you just added the drivers into a folder under C: and pointed the OS to that path, it will only use the drivers it needs, meaning if it has a default or generic driver already in the OS, it will use that instead of what you choose.

    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. ”


    Saturday, August 10, 2013 3:00 PM

All replies

  • They're named the same but they are two different things. "Inject Drivers" under the Preinstall section is an Inject Drivers task that allows you to designate which drivers will be installed (via selection profile) ; "Inject Drivers" under Postinstall is actually a Run Command Line task that calls ZTIDrivers.wsf, the script that performs the heavy lifting for driver injection. 

    The second "Inject Drivers" is a proper step. Don't remove it.

    -Nick O.


    • Edited by Nick Ourso Tuesday, August 6, 2013 3:11 PM edit
    • Proposed as answer by Frank TroutMVP Saturday, August 10, 2013 3:09 PM
    • Unproposed as answer by David Zemdegs Tuesday, August 13, 2013 3:40 AM
    Tuesday, August 6, 2013 3:11 PM
  • Thanks - Then how do I tell the second Inject Drivers step that runs ztidrivers.wsf what drivers I want injected?

    David Z

    Tuesday, August 6, 2013 9:18 PM
  • Thanks. That only describes ztidrivers in the pre-installation phase. The default server TS has the selection option in the pre installation phase and ztidrivers in the post installation phase.

    In which case what does the inject drivers do in the pre-installation phase as there is no operating system installed for the drivers to be installed to?

    • Proposed as answer by Paul Cervantes Tuesday, February 25, 2014 1:50 PM
    Wednesday, August 7, 2013 12:33 AM
  • They're named the same but they are two different things. "Inject Drivers" under the Preinstall section is an Inject Drivers task that allows you to designate which drivers will be installed (via selection profile) ; "Inject Drivers" under Postinstall is actually a Run Command Line task that calls ZTIDrivers.wsf, the script that performs the heavy lifting for driver injection. 

    The second "Inject Drivers" is a proper step. Don't remove it.

    -Nick O.


    Just to clarify, this isn't actually true.  The "Inject Drivers" IS ZTIDrivers.wsf... it just looks a little different because of the Profile options.  See the code from the ts.xml for example:

        <step type="BDD_InjectDrivers" name="Inject Drivers" description="" disable="false" continueOnError="false" runIn="WinPEandFullOS" successCodeList="0 3010">
          <defaultVarList>
            <variable name="DriverSelectionProfile" property="DriverSelectionProfile">All Drivers</variable>
            <variable name="DriverInjectionMode" property="DriverInjectionMode">AUTO</variable>
          </defaultVarList>
          <action>cscript.exe "%SCRIPTROOT%\ZTIDrivers.wsf"</action>
        </step>

    and the one in Postinstall:

        <step name="Inject Drivers" disable="false" continueOnError="false" successCodeList="0 3010" description="" startIn="">
          <action>cscript.exe "%SCRIPTROOT%\ZTIdrivers.wsf"</action>
          <defaultVarList>
            <variable name="RunAsUser" property="RunAsUser">false</variable>
            <variable name="SMSTSRunCommandLineUserName" property="SMSTSRunCommandLineUserName"></variable>
            <variable name="SMSTSRunCommandLineUserPassword" property="SMSTSRunCommandLineUserPassword"></variable>
            <variable name="LoadProfile" property="LoadProfile">false</variable>
          </defaultVarList>
        </step>

    Yes, they look different, but they both call ZTIDrivers.wsf.


    David Coulter | http://DCtheGeek.blogspot.com | @DCtheGeek

    Wednesday, August 7, 2013 3:19 AM
    Answerer
  • Yes but I still dont understand what they do, why you require pre and post install and why you would run ztidrivers without a selection profile.

    Lets assume an OS needs a RAID driver to access a disk. In building a server using MDT you have two OSs, Winpe and the server (lets say w2k8).

    To insert the driver into winpe, you use the deployment share properties, winpe tab.

    To insert the driver into w2k8, you run the inject drivers. Im assuming that the inject drivers in the pre-install step will do something like copy the drivers into the "X" drive temporarily, load the w2k8 image, then copy the drivers from "X" onto the "C" drive in a location that pnp recognises. Is this how it works? In which case why do you need a post-install inject drivers?

    Thanks

    David Z

    Thursday, August 8, 2013 9:23 PM
  • David, your assumption is close. The pre-install ztidrivers.wsf stages the drivers, matching it by the PnP ID and/or your selection profile, and the post-install actually injects the drivers into the OS, forcing the OS to use the drivers that you selected in MDT (the drivers you choose) and not any "generic "drivers that may already be present in the OS. The injection is important because if you just added the drivers into a folder under C: and pointed the OS to that path, it will only use the drivers it needs, meaning if it has a default or generic driver already in the OS, it will use that instead of what you choose.

    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. ”


    Saturday, August 10, 2013 3:00 PM
  • So the pre-install inject drivers does a full pnp evaluation of the hardware, and matches up all the drivers in the selection profile. You mention that at this point the drivers are "staged"? Does that mean they are copied to the "X" drive?

    And the post install doesnt need a selection profile because it already "knows" about the drivers you injected in the pre install and just copies them from "X" to  somewhere on "C"?

    Monday, August 12, 2013 12:10 AM
  • The pre-install driver injection simply gathers the necessary drivers based on your selection profile if any, or the PnP automatic detection. It copies those drivers from your deployment location to a temporary Out-of-Box folder in the internal hard disk. After that, it decompresses your WIM image into the internal drive and reboots. During the second driver injection phase, it will actually do the driver install into the operating system using the drivers that were copied during the pre-install phase.
    Thursday, October 8, 2015 6:54 PM