Who is this for?
This is for anyone that uses Windows image files *wim. If you don't then it might be best to look away :)
To add updates to an image of Windows 10 will save time when it comes to deploying a new computer. This technique will work with an MECM/SCCM deployment or WDS. You should even be able to replace the WIM file in a boot USB device. The advantage is that your freshly imaged computer will be delivered with the updates pre-installed.
- ISO file of the Windows 10 image that you want to update. Note this assumes that there is only one image in the WIM file. If there are multiple images in your WIM file you will need to export this before proceeding. The information on how to do this can be found elsewhere.
- Administrator access on the computer you will be performing this task
- Reference computer built using your image fully updated from Microsoft Update. This is used to get the list of required updates
- Open an Administrator command prompt
- Type "C:" to confirm that you are working on the C: drive
- Type "MD C:\Temp". This will create a folder called C:\Temp. You can use another name if you choose, but you will need to alter your references accordingly.
- Type "CD \Temp" you should now be in your working folder
- Type "MD Updates" (To hold windows updates)
- Type "MD Mount" (working directory used by the DISM command)
- Go online to https://www.catalog.update.microsoft.com/home.aspx and type in the KB numbers that you want to add to your image. For example 4497165 and then search. You will find the numbers on your reference computer under "View installed updates" in the Control Panel.
- Download the appropriate version for your Operating System and architecture (x86/x64 etc.) and place it into "C:\Temp\Updates". Do this for all updates that you need to add to the image.
- Type "Notepad addUpdates.cmd" and then press enter. You will be told that the file does not exist and would you like to create it.
- Copy the following lines into addUpdates.cmd
dism /mount-wim /wimfile:%1 /index:1 /mountdir:Mount
dism /image:Mount /add-package /PackagePath:Updates
dism /unmount-wim /mountdir:Mount /commit
- Close the file and click Yes to save the contents
- Right click on the ISO file and select mount. Mine appeared as E: drive
- in your Administrator cmd prompt type "Copy E:\Sources\install.wim C:\Temp\Install.wim". You may need to export your specific version of Windows 10 here as most Windows OS disks have multiple versions in the one WIM file
- It is best to call your WIM file something that identifies what it actually contains. IE. Something like "w10Ent1909x64.wim" Would identify the file as containing Windows 10 Enterprise 1909 x64. Use whatever naming convention makes sense to you. Rename it now.
- in the cmd prompt type "addUpdates.cmd w10Ent1909x64.wim" replacing "w10Ent1909x64.wim" with the name of your WIM file.