Pardon my jumping in. Here are the steps that I use which are working 100% flawlessly for me:
Adding Windows updates:
Open elevated PowerShell or command prompt. Enter following command to check what editions are included in image:
Code:
Dism /Get-WimInfo /WimFile:D:\ISO_Files\Sources\install.wim
Note the index number of your selected edition. In this example we are using an index number of 6 which in this example is for Windows 10 Pro.
Mount the image of your preferred Windows 10 edition using its index number, index 6 in this example:
Code:
dism /mount-image /imagefile:D:\ISO_Files\sources\install.wim /index:6 /mountdir:D:\Mount
Get the Windows update package(s) from the Microsoft Update Catalog. For example, grab the latest cumulative update listed for Windows 10. Place the .msu file update to a folder, for example, C:\WindowsUpdates\windows10.0-kb4016871-x64_27dfce9dbd92670711822de2f5f5ce0151551b7d.msu.
Tip: You can rename the file to something shorter to make it easier to work with. For example, KB4016871.msu.
Add the updates to the image. For packages with dependencies, make sure you install the packages in order. If you’re not sure of the dependencies, it’s OK to put them all in the same folder, and then add them all using the same DISM /Add-Package command by adding multiple /PackagePath items.
Example: adding a cumulative update to a mounted image:
Code:
Dism /Add-Package /Image:"D:\Mount" /PackagePath="D:\WindowsUpdates\windows10.0-kb4016871-x64_27dfce9dbd92670711822de2f5f5ce0151551b7d.msu" /LogPath=D:\Mount\dism.log
Example: adding multiple updates:
Code:
Dism /Add-Package /Image:"D:\Mount" /PackagePath="D:\WindowsUpdates\kb00001.msu" /PackagePath="D:\WindowsUpdates\kb00002.msu" /PackagePath="D:\WindowsUpdates\kb00003.msu" /LogPath=D:\Mount\dism.log
Lock in the updates, so that they are restored during a recovery.
Code:
DISM /Cleanup-Image /Image:"D:\Mount" /StartComponentCleanup /ResetBase /ScratchDir:D:\Temp
Verify that the packages appear correctly:
Code:
Dism /Get-Packages /image:”D:\Mount”
Review the resulting list of packages and verify that the list contains the package. For example:
Code:
Package Identity : Package_for_RollupFix~31bf3856ad364e35~amd64~~15063.250.1.1
State : Installed
Release Type : Security Update
Install Time : 04/29/2017 6:26 PM
The operation completed successfully.
Note
Each package will usually be a new KB, and will increase the build revision number of Windows on the device. The revision number of windows a device can be found in the following registry key:
Code:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\UBR
If you're done updating your image, you can unmount it, committing changes.
Code:
Dism /Unmount-Image /MountDir:"D:\Mount” /Commit
-----------------
******************************************
* Adding Individually Downloaded Drivers *
******************************************
If you downloaded individual drivers, you can add them now to offline mounted image with following command:
For signed drivers, use this command:
Code:
dism /Image:D:\Mount /Add-Driver /Driver:X:\Drivers\DriverName.inf
For unsigned drivers, use this command:
Code:
dism /Image:D:\Mount /Add-Driver /Driver:X:\Drivers\DriverName.inf /ForceUnsigned
Replace mount folder path D:\Mount in above sample command with actual path to your mount folder, and driver path and name X:\Drivers\DriverName.inf with actual path to downloaded driver
*************************************************
* Adding Multiple Drivers by Recursing a Folder *
*************************************************
If you have folder that contains multiple drivers in subfolders, like for when exported from an existing installation, you can add all drivers with one simple command, replacing mount folder and drivers folder paths with your actual paths:
Code:
dism /Image:D:\Mount /Add-Driver /Driver:D:\Drivers /Recurse
/Recurse switch will tell PowerShell to go through the main folder and its subfolders, adding all drivers it finds.
********************
* Removing Drivers *
********************
If you want to remove a driver from offline image, use the following command:
Code:
dism /Image:D:\Mount /Remove-Driver /Driver:X:\Drivers\DriverName.inf
With /Add-Driver and /Remove-Driver you can add or remove multiple drivers:
Code:
dism /Image:D:\Mount /Add-Driver /Driver:X:\Drivers\DriverName.inf /Driver:X:\Drivers\Driver2Name.inf