There is no need to create a bunch of different sysprep images. You can simply inject the drivers that you need into your existing image.
Before I begin the detailed instructions, I suggest that you have the Windows ADK installed and that all the commands below be run from an elevated "Deployment and imaging tools environment" command prompt.
Also, I suggest reading through this entire procedure as there are tips near the end that may modify the steps that you take in this procedure.
NOTE: You reference TrueImage. This entire procedure is geared toward modifying a Windows image and injecting the drivers that you need into that image. If that does not suit your needs, make sure to see SECTION 2 below where I have an idea for an alternate method of deploying your drivers without needing to inject the drivers into your Windows image. I'm not really familiar with TrueImage (been a long time since I used it), so hopefully something here at least gives you ideas you can use.
Begin by mounting the INSTALL.WIM file for your sysprep image. A sysprep image usually has only 1 index so I'm using index #1 in the below example. In this example substitute the correct paths in place of these:
C:\ISO_Files\Sources\install.wim <-- This is the location of the INSTALL.WIM file. Typically I use C:\ISO_Files as the location where I extract the entire ISO image to.
C:\Mount <-- This is where I wish to mount the WIM file so that I can make changes to it.
Here then is the command to run:
Code:
Dism /Mount-Image /ImageFile:C:\ISO_Files\Sources\install.wim /Index:1 /MountDir:C:\Mount
To add a single driver use one of these commands:
Next, for signed drivers, use this command:
Code:
dism /Image:C:\Mount /Add-Driver /Driver:C:\Drivers\DriverName.inf
For unsigned drivers, use this command:
Code:
dism /Image:C:\Mount /Add-Driver /Driver:C:\Drivers\DriverName.inf /ForceUnsigned
If you have a folder that has multiple drivers in multiple subdirectories, you can add all of them to your image like this (use in place of the command above):
Code:
dism /Image:C:\Mount /Add-Driver /Driver:C:\Drivers /Recurse
Once the drivers have been added using any of the above, unmount the image like this:
Code:
dism /Unmount-Image /MountDir:C:\Mount /Commit
Now, re-create your Windows image with the newly updated INSTALL.WIM.
Here is an example of re-creating the ISO image file. Be careful with the syntax of this command; there are spots in this command where you might expect a space but none is present.
Code:
oscdimg.exe -m -o -u2 -udfver102 -bootdata:2#p0,e,bc:\iso_files\boot\etfsboot.com#pEF,e,bc:\iso_files\efi\microsoft\boot\efisys.bin c:\iso_files c:\Win10PROx64.iso
Replace the 3 occurrences of c:\iso_files with the correct path to where your files are located. Also, replace the c:\Win10PROx64.iso at the end of command with the correct path and name for the output file that you want to save. If that path contains spaces, enclose it in quotes.
TIPS:
When you add drivers, the .INF for the driver must be available for the above procedure to work. If you have a single driver in .CAB file format, you will need to extract it first. Here is an example of how to do this:
At your command prompt, change to the directory where your CAB file is located and then run these 2 commands:
Code:
md .\extracted
expand .\driver.cab -f:*.* .\extracted
The extracted driver will now be available in the "extracted" subdirectory.
It is possible to inject ALL drivers needed for system into your image file. By doing this, all the drivers will be installed on the system during Windows installation. Note that it is perfectly fine to install drivers from multiple systems into your image. During setup, Windows will install the drivers appropriate for the system onto which you are installing. As an example, I have a single sysprep image with all the drivers for all of my systems. When I install my sysprep image on any of my systems, all the drivers for that system get installed automatically.
To do this, follow these steps:
Setup a system with all the correct drives for that system.
From an elevated command prompt on that system, run this command:
Code:
pnputil /export-driver * C:\ExportedDrivers
Now, simply use the steps above to inject these drivers into the image using the option for injecting multiple drivers and recursing all subdirectories.
SECTION 2: An alternative way to install your drivers without injecting them into your image.
As noted earlier, the steps above are all geared toward updated a Windows Image (sysprepped or not). If you are going install Windows not through the normal Windows unattended setup mechanisms, but using TrueImage, consider creating your image to include a RunOnce section and point that to a batch file located on your install media (flash drive).
An advantage of this is that you won't need to modify your image and that you can make changes by simply changing that batch file at any time. You can even omit that batch file or leave it empty to take no action.
In the batch file, simply include a line like this:
Code:
pnputil /add-driver D:\ExportedDrivers\*.inf /subdirs /install
This will install all drivers from the D:\ExportedDrivers folder, recursing all subdirectories. In this example, I'm making the assumption that D: is the flash drive.
I hope that all of this at least sparks some ideas for you!