- Inject Drivers Into Winpe Windows 10
- How To Inject Drivers Into Winpe Iso
- Inject Drivers Into Winpe Boot Image
You can use DISM to install or remove driver (.inf) files in an offline Windows or WinPE image. You can either add or remove the drivers directly by using the command prompt, or apply an unattended answer file to a mounted .wim, .ffu, .vhd, or .vhdx file.
When you use DISM to install a device driver to an offline image, the device driver is added to the driver store in the offline image. When the image is booted, Plug and Play (PnP) runs and associates the drivers in the store to the corresponding devices on the computer.
But unluckily that didn't work. I am not able to add the Intel® Rapid Storage Technology enterprise (Intel® RSTe) RAID Driver (x64 Bit) after loading into WinPE mode. And that's why Hard Disks are not getting detected. Drvload command still says that drivers are loaded but actually it didn't. I tried in WinPE 4.0. Before injecting the driver in the WinPE image, make sure you have the right version and the right.inf file in your catalog of drivers in SCCM. If you do, make sure you are inserting the right file and version in the WinPE image, and if not, add that.inf file to your SCCM driver catalog before injecting it into the WinPE image. Hope this helps! Usually, added drivers are network drivers and RAID. Add Drivers in WinPE by AOMEI PE Builder. The freeware AOMEI PE Builder is not an adding tool, but a creating tool. With it, you can create a bootable environment based on Windows PE without installing AIK/WAIK. Compared to WinPE, the environment built by AOMEI PE Builder has many advantages. In this article, we will show you how to add the necessary device drivers directly into the Windows installation image. The integration of the device drivers into your offline Windows image is widely used when you need to deploy a large number of workstations and servers on the same hardware.
Note
To add drivers to a Windows 10 image offline, you must use a technician computer running Windows 10, Windows Server 2016, or Windows Preinstallation Environment (WinPE) for Windows 10. Driver signature verification may fail when you add a driver to a Windows 10 image offline from a technician computer running any other operating system.
To learn how to add a driver on a running Windows PC, see Add a driver online in audit mode or Install a plug and play device. To learn how to add a driver to a PC running WinPE, see Drvload command line options.
Driver types
- .inf-style drivers: Many drivers include an information file (with an .inf extension) to help install the driver. These can be installed using tools described in this topic.
- .exe-style drivers: Drivers without an .inf file often must be installed like typical Windows desktop applications. To learn how to add these, see Add a driver online in Audit Mode
- Boot-critical drivers: Graphics and storage drivers may sometimes need to be added to the Windows image (as shown in this topic), as well as the Windows PE image, and in the Windows recovery (WinRE) image.
Add drivers to an offline Windows image
Sometimes it is necessary to manually inject drivers into the Boot.wim file to allow client computers to properly recognize the network card, USB3 or other devices. This is most easily done with the Deployment Image Servicing and Management tool, commonly known as DISM. If that’s the case, you’ll need to manually inject drivers into the Boot.wim file to allow PXE client computers to recognize their network card. This is also true for any other types of drivers that you need to add to the image as well. Here’s the steps to setup and inject the.
To add drivers to an offline image, you have to mount an image prior to adding drivers.
If you're adding drivers to a WinPE image, you can add them to the WinPE image in the output folder you specified when you ran copype, for example:
C:WinPE_amd64mediasourcesboot.wim
. This ensures that drivers will be included in WinPE each time you build WinPE media from that folder.- Mount a Windows image. For example:See Mount and modify a Windows image using DISM for more info.
- Add a driver to the image.To install all of the drivers from a folder and all its subfolders, point to the folder and use the /Recurse option.To see all DISM driver servicing command line options, see DISM driver servicing command-line options.
Warning
Using
/Recurse
can be handy, but it's easy to bloat your image with it. Some driver packages include multiple .inf driver packages, which often share payload files from the same folder. During installation, each .inf driver package is expanded into a separate folder. Each individual folder has a copy of the payload files. We've seen cases where a popular driver in a 900MB folder added 10GB to images when added with the /Recurse option.- Check to see if the driver was added. Drivers added to the Windows image are named Oem*.inf. This guarantees unique naming for newly added drivers. For example, the files MyDriver1.inf and MyDriver2.inf are renamed Oem0.inf and Oem1.inf.
- Commit the changes and unmount the image.
Remove drivers from an offline Windows image
- At an elevated command prompt, mount the offline Windows image:
- Remove a specific driver from the image. Multiple drivers can also be removed on one command line.
Warning
Removing a boot-critical driver package can make the offline Windows image unbootable. For more information, see DISM Driver Servicing Command-Line Options.
- Commit the changes and unmount the image.
Add drivers to an offline Windows image by using an unattended answer file
- Gather the device driver .inf files that you intend to install on the Windows image.
Note
All drivers in the directory and subdirectories that are referenced in the answer file are added to the image. You should manage the answer file and these directories carefully to address concerns about increasing the size of the image with unnecessary driver packages.
- Use Windows System Image Manager (Windows SIM) to create an answer file that contains the paths to the device drivers that you want to install.
- Add the
Microsoft-Windows-PnpCustomizationsNonWinPEDriverPathsPathAndCredentialsCredentials
component to your answer file in the offlineServicing configuration pass.
For each location that you intend to access, add a separate PathAndCredentials list item by right-clicking on DriverPaths in the Answer File pane and clicking Insert New PathAndCredentials.See Configure components and settings in an answer file for information on how to modify an answer file. - Add the
- For each path in
Microsoft-Windows-PnpCustomizationsNonWinPE
, specify the path to the device driver and the credentials that are used to access the file, if the file is on a network share.
Note
When you include multiple device driver paths by adding multiple PathAndCredentials list items, you must increment the value of Key for each path. For example, you can add two separate driver paths where the value of Key for the first path is equal to 1 and the value of Key for the second path is equal to 2.
- Save the answer file and exit Windows SIM. The answer file must resemble the following sample.
- Mount the Windows image that you intend to install the drivers to by using DISM:If you're working with a VHD or FFU, specify
/Index:1
. - Apply the answer file to the mounted Windows image:For more information about how to apply an answer file, see DISM Unattended Servicing Command-Line Options.The .inf files referenced in the path in the answer file are added to the Windows image.
- Check to see if the driver was added. Drivers added to the Windows image are named Oem*.inf. This guarantees unique naming for newly added drivers. For example, the files MyDriver1.inf and MyDriver2.inf are renamed Oem0.inf and Oem1.inf.For example, type:
- Unmount the .wim file and commit the changes. For example, type:
If you need drivers for WinPE to see the local hard disk drive or a network, you must use the windowsPE configuration pass of an answer file to add drivers to the WinPE driver store and to reflect boot-critical drivers required by WinPE. For more information, see Add Device Drivers to Windows During Windows Setup.
Related topics
Learning has never been so easy!
This HowTo is how to control what drivers get installed per model when you deploy an image with Microsoft Deployment Toolkit.
Note: If using ADK10 then substitute the folder name WinPEx64 and WinPEx86 for WinPE10x86 WinPE10x64.
Note: If your using MDT 8443 then see the link below for fixing the capture bug.
https://community.spiceworks.com/how_to/138246-how-to-fix-mdt-8443-missing-capture-screen
10 Steps total
Step 1: Gather You Drivers
Please visit the vendor's website for the drivers to your PC or laptop models.
I recommend never visiting these rogue sites for drivers. Make a driver repository on your network to keep them in a safe place so you will have a backup.
I recommend never visiting these rogue sites for drivers. Make a driver repository on your network to keep them in a safe place so you will have a backup.
Step 2: The Boot Image
Navigate to the Out of Box Drivers node and create a folder called WinPEx86. If you use x64 then make a folder called WinPEx64. The only drivers we will need to this folder normally are the NIC drivers. But we need to structure things before we add in the nic driver.
On each model PC you have while you’re at the desktop click start and go to a CMD. Type in the command wmic and press enter. Now type computersystem (all one word). Scroll to the right side and what you are looking for is the maker/model of that computer. You need make a note of the maker/model exactly how it shows. Case sensitive and space sensitive.
To make the structure for the boot image you will want to make a structure with the exact Model name. I usually create a NET folder and put the driver in it. WinPEModel is a must.
Step 3: The Boot Image (Continued)
Here is another pic with all my models in it. Again this is only adding the NIC driver into the boot image so it can support all models.
Step 4: Setup A Selection Profile For The Boot Image
You will need to continue to structure your WinPE folder this way per model computer you have until all the nic drivers per model are in there. We need to create a selection profile for the WinPE folder or folders you made.
Navigate to the Advanced Configuration node. Right click on Selection profiles and create new selection profile. You will need the name of the folder WinPEx64 or WinPEx86. Whichever architecture your using. Select the WinPE folder as you see in the pic. Click next and finish.
You have completed the structure and added the NIC drivers for the boot image. That is all there is to it there.
The final step in this process is to go to the properties of your deployment share > WinPE tab, choose your platform type, then click Drivers and Patches tab. Select the WinPE selection profile so MDT knows where to get NIC drivers for the boot image to inject. Close the properties windows and update your deployment share by right clicking your deployment share and choose Update.
The boot images will get created with the NIC drivers you specified in the selection profile. The boot images will reside at the deploymentshareboot folder. If you wish to PXE boot you can import the boot image from WDS to look at the boot folder.
Step 5: Adding Base Drivers
Now that you know the maker/model of your computers we need to setup the same structure so MDT will inject all the drivers for the computers when it needs it. Let’s setup the structure.
Navigate to the Out of Box Drivers node and create a folder called Dell Inc. (Just like the computer showed you when you ran the wmic> computer system command).
Inside the Dell Inc. folder create a new folder and call it the exact model (case sensitive and space sensitive) of your computer. (just like the computer showed you when you ran the wmic> computer system command).
At this point most people just dump the drivers into that model folder. You can do this as well. I avoid duplicates when it shows me duplicates.
Continue performing these steps for all dell models. The same procedures for the HP models as well. I think the maker for HP is spelled out as Hewlett-Packard when you run the wmic > computer system command.
After the above is completed the structure should be:
Out of box drivers > Dell Inc. (if you use HP then it would be Hewlett-Packard) > Models of computers. I am using Toshiba as an example in the pic.
Out of box drivers > Dell Inc. (if you use HP then it would be Hewlett-Packard) > Models of computers. I am using Toshiba as an example in the pic.
Step 6: Setup Selection Profiles For All Models
Inject Drivers Into Winpe Windows 10
Setting up Selection profiles for all models. The process is the same that you did for the WinPE. Here is a pic of my model with a selection profile. Name the selection profile the exact same name as the model. The important thing you select the correct maker/model and all is named correctly.
I have a good amount of Dell machines in my deployment share as you can see in the pic.
Step 7: End Result of Selection Profiles Once Made
See pic.
Step 8: Editing The Default Client Task Sequence
Open your task sequence that you have been using. Navigate to the Preinstall > Inject Drivers step. Click the drop down menu and choose “Nothing” for the selection profile. This will disable the pnp so we can take control of the driver injection.
While the Inject Drivers step is highlighted look at the top and click ADD > General > New Task Sequence Variable. At the top of the page you will need to move this new step right above the “configure” step as you see in the pic below. Name the step a name of “Set Driver Path” and for the task sequence variable to DriverGroup001 and the value to %Make%%Model% Click OK to save the change.
Step 9: Inject Driver Step Change
Look a couple steps down in the Task sequence and you will see the Inject Drivers step. We should change this to 'NOTHING' for the selection. At this point watch the deployment and you should see where it is install the drivers right after the format of the C drive. Do not forget to update the deployment share and add the boot file that MDT makes to the WDS server if you use WDS for PXE booting.
How To Inject Drivers Into Winpe Iso
Step 10: Configure MDT to Create Boot Image
You should change the default for the boot image creation process to point to your selection profile called WinPEx64. This is located in the properties of your deployment share.
Inject Drivers Into Winpe Boot Image
You should see the drivers that you specified per model being injected during the deployment. MDT will no longer need to take the time to try and figure out the best driver (PnP) because you have taken Total Control.
Published: Apr 29, 2015 · Last Updated: Apr 05, 2017
25 Comments
- PoblanoJudopunch Jan 12, 2017 at 05:09pmThanks for this! This is a great learning resource! I'm just starting in IT and this was very helpful!
- HabaneroJago Wu Jan 13, 2017 at 12:32pmI am glad the doc helped you out Justin. Thanks
- AnaheimAutumnBreeze Feb 3, 2017 at 04:55pmThis was helpful for me as well. I have access to paid training, but nothing that explained how to practically apply this information. -Thank you!
- HabaneroJago Wu Feb 3, 2017 at 05:00pmYou're welcome Autumn. I am glad the doc helped you out. Thanks
- PimientoJath Aug 30, 2017 at 05:49pmQuestion for you Jago. Using the Total Control method of driver injection with MDT, there is one model that is not getting it's drivers injected properly. The Dell Latitude 7480 is not. Now, on the laptop, we have ran 'wmic csproduct get name' and it comes out to Latitude 7480. Under the path for Out of box drivers, I have a folder with drivers in it named Latitude 7480.What could be the reason that? It looks like everything is setup just the same as other models and the other models work just fine.Thank you.Edit: Wanted to edit to add more information.It doesn't even attempt driver injection, which makes me think that it's not detecting the model the same as I have the folder named, even though the wmic command says it's that model.
- HabaneroJago Wu Aug 30, 2017 at 05:58pmI only injected some of those drivers in MDT from the .cab file from Dell. The rest of the drivers I downloaded the .exe packages and extracted them.Then created a batch file that calls for those setup.exe and install.exe and tested via CMD line. The batch file is in the root folder that was created from the extraction. Inside the batch is a simple command to call the silent install. Once completed I imported each into MDT as an application.Then edited the Rules as such for the injection:[Settings]
Priority=TaskSequenceID,Model,Default - PimientoJath Aug 30, 2017 at 06:18pmAhhh, okay. Yeah, I did the total control where you import the .cab into MDT's out-of-box driver folder structure, E.G. Windows 10>x64>Latitude 7480, and then in the Task Sequence I did the Set Drivergroup as Windows 10>x64>%Model%. It works for everything but the Latitude 7480, so I didn't know if you knew anything about that or not.Alas, the search continues. Thank you!
- HabaneroJago Wu Aug 30, 2017 at 06:22pmHonestly the reason why I have noticed is some hardware need the full setup package and will not accept just the .inf files.You could turn on logging in the Rules of MDT and then review the log to see what happened.Projects for these platforms can be written in C#, VB, and C. Not so at all.Ladies, and gentlemen of all shapes and sizes, let me, if you haven't got it, and/or you ain't seen it or used it, introduce you to Microsoft latest take on Visual Studio 2015 (see screenshot below)Visual Studio 2015 - New Project Dialog86.52K 78 downloadsIn the New Project dialog, that one can create a project for iOS and Android. Impossible you reckon. E- sword free download for android.https://community.spiceworks.com/how_to/111518-how-to-enable-logging-of-mdt-deployments-for-troubleshooting
- JalapenoMikeCS Jan 26, 2018 at 08:25pmThis an awesome post. I have the task of setting up MDT in our infrastructure and definitely needed some tips and how-to's.I have a question about the selection profiles. I understand creating the WinPE10x64 selection profile with just the ethernet drivers, however, when we create selectopn profiles for the ret of the drivers for each model, do we need to create a separate boot file and save it to WDS as the specific model?Probably a stupid question but I am getting a little confused.
- HabaneroJago Wu Jan 26, 2018 at 08:38pmWhen you say 'the rest of the drivers' are you talking about the Windows drivers (Sound, Video, chipset, etc)?
- JalapenoMikeCS Jan 29, 2018 at 01:38pmSorry for the confusion and all the typos. It was Friday afternoon. ;-)In your post you created a WinPE10x64 folder in the Out Of Box Drivers section and added just the ethernet drivers, created a Selection Profile called WinPE10x64, selected the folder WinPE10x64 form the Out Of Box section with all the ethernet drivers for the boot file.You then updated the Deployment Share to only use the WinPE10x64 Selection Profile in the Drivers and Patches section within the WinPE section.I then created the secondary folder in the Out Of Box Drivers section for those remaining system drivers.I was confused on how the Sound, Video, chipset, etc drivers, get installed afterwards if we are only injecting the ethernet drivers during the boot process.But, after a little more digging, I think I needed to add those remaining system drivers into a new Selection Profile (for each specific model). Then in a install new image Task Sequence I created, I use that new Selection Profile within the Inject Drivers section.Does this make more sense and is this the correct process?Thank you for your help!
- HabaneroJago Wu Jan 29, 2018 at 01:44pmCorrect. Add the remaining drivers and make selection profile for each model. For them to get injected in the TS follow step 8.
- JalapenoMikeCS Jan 29, 2018 at 02:41pmWow, how did I miss those steps..Sorry to bug you and thank you for clarifying my oversight.
- HabaneroJago Wu Jan 29, 2018 at 02:43pmNo problem. Let us know if you got it working. Thank You
- Jalapenohenryarroyo Feb 23, 2018 at 09:52pmI have a number of Insprion models and noticed that Dell only provides the CAB packs for Optiplex, Precision, XPS, and Latitude systems. I know that I can just look up the models I have and individually import their drivers into MDT, but I was wondering if you might know of a quicker way to do this.
- prev
- 1
- 2
- next