DISM can preload Windows Update packages into your images. This guide will show you how to use DISM to load updates and includes a nearly automated way to slipstream 100+ updates at once.

Joseph Moody

Joseph Moody is a network admin for a public school system and helps manage 5,500 PCs. He is a Microsoft Most Valuable Professional (MVP) in Cloud and Datacenter Management and blogs at DeployHappiness.com.

Update: If you are looking for a way to download updates read this  and this new article explains how to slipstream updates with  PowerShell and SCCM.

If you have ever watched a fresh OS install download update after update, you understand how frustrating and time consuming it can be. There are several solutions that will ensure a new machine is completely patched before the end user even gets the machine. For example, MDT includes two separate tasks for updating a machine during a task sequence.

The Windows Update Task in a MDT Task Sequence can slow down imaging

The Windows Update Task in an MDT Task Sequence can slow down imaging.

Another common method is to load Windows Update packages into the MDT Deployment Workbench Packages container.

The downside to most methods is the increase in imaging times. When you are installing 150+ updates on a Windows 7 machine, things can slow down to a crawl.

One great alternative is to use DISM and the /add-package parameter. With DISM and a simple batch file, we can loop through Windows Update packages and apply them to our .WIM files. Let’s briefly cover DISM and prep our environment before jumping into the cooler stuff.

Using DISM to install Windows Update packages ^

Start by creating a folder in the root of C:\. Name the folder Mount. Next, launch an administrative command prompt (WIN + X, A for Windows 8+ machines) and execute DISM to see the list of available options and the proper syntax. If you have ADK installed, you can launch the Deployment and Imaging Tools Environment shortcut as an administrator. This is my preferred method.

Getting help with DISM is made easier with command prompt examples

Getting help with DISM is made easier with command prompt examples.

Your first step is to mount your OS install.wim file. If you are using MDT, this file is located in your DeploymentShare under Operating Systems\OS Name\sources\. At your administrative command prompt, type the following:

When the WIM is mounted, you should be able to browse to C:\Mount and view the contents.

A mounted WIM within Windows Explorer. An OS within an OS

A mounted WIM within Windows Explorer. An OS within an OS.

To add a Windows update, type the following command:

Adding updates with the above command is almost as tedious as watching 150 of them install. In the past, I would head to the Windows Update catalog and download every update that was needed. Although I will still do this for some single updates, I use a faster method now.

The easier way to slipstream Windows updates ^

To use this method, you will need to set up a fresh machine and let it fully update. This has to be done for each OS that you deploy. Luckily, you will only have to do this one time. When your first machine is fully patched, head back to your administrative command prompt and type the following:

Be sure to specify your machine’s name in the command. This will launch a new window where you can watch as each update is installed. Even though this part is automated, it will still take a while to complete (about an hour for my test VM).

DISM successfully adding Windows Updates to our WIM

DISM has successfully added Windows updates to our WIM.

Once you are at the return prompt in the second window, all available updates have been slipstreamed. Head back to your first command prompt and type:

At this point, DISM will apply the changes that you’ve made, save your image, and unmount it. Your local Mount folder should now be empty. To speed up this process on other operating systems, save the following commands in a batch file:

Deploy your fully patched image to a test computer. Once the install finishes, check Windows Updates for any available updates. You should notice a drastic reduction! In my case, only updates that install with an EXE were still available. From here, you can deploy those remaining updates with WSUS or MDT Applications, or you can allow the Windows Updates task to finish the job.

Update: If you are looking for a way to download updates read this  and this new article explains how to slipstream updates with  PowerShell and SCCM.

Win the monthly 4sysops member prize for IT pros

Share
0

Related Posts

150 Comments
  1. Rory Schmitz 4 years ago

    Excellent! Does this also work for SCCM 2012/R2? If so, are there any extra steps to do so?

    0

  2. Mark 4 years ago

    I believe sccm 2012 r2 has this feature built in. Point your wim file to your WSUS server and it will auto inject updates periodically as scheduled without having to mount the wim or use DISM.

    0

  3. Author
    Joseph Moody 4 years ago

    Hi Rory - SCCM 2012+ includes this feature. Select your WIM and then choose the Schedule Updates action.

    You will need SUP configured in SCCM though.

    0

  4. Rory Schmitz 4 years ago

    Great, thank you both!

    0

  5. David DIAGNE 4 years ago

    Nice article. I have to try it !
    I think there is a typo in the variable used in the For loop.
    If you have to give the path and not the cab filename, you can use "%~dpf%\." or just %f if it's ok with the cab filename.
    Regards

    0

  6. Author
    Joseph Moody 4 years ago

    Thank you David - %f should work fine. Give it a try and let me know if you have any issues!

    1+

  7. Sam Cayze 4 years ago

    Great! Now how can I do this to my Office setup files? Once I install Office via a Task Sequence, there are still a ton of MS updates to install. I know I can drop them into the packages folder, but that's tedious, and it's not true slip-streaming like this process is.

    0

  8. The Antioch 4 years ago

    the %u at the end of the second command needs to be changed to %f, thats the only way I got this to work. the file attempts to pull the updates out but i just keep getting dism failed notices.

    2+

  9. Fernando Madruga 4 years ago

    If you get a cryptic error along the lines of "The filename, directory name, or volume label syntax is incorrect." - copy/paste the above line into a text editor or make sure to replace the quotes - the ones here may LOOK like "normal" ones, especially when pasted on a CMD, but they are indeed different!
    Took me a few tries until I decided to paste the line into an editor and then I could see what was wrong.

    Good artcicle, btw!

    0

    • Author
      Joseph Moody 4 years ago

      You are all over the place! 🙂

      Scripts can format strangely sometimes so thank you for pointing that out.

      0

  10. james 3 years ago

    I am trying to update one of the images but was getting an error. I had a look at the directory structure on the mounted image and it doesn't actually have a SoftwareDistribution Folder under the windows directory. I am assuming windows update creates this the first time it is run? Does this mean this method won't work for our images?
    Thanks.

    0

  11. Author
    Joseph Moody 3 years ago

    Hey James - I've used this against the default install.wim folder. Are you using a captured wim?

    0

  12. jiffelriffel 3 years ago

    Hey moody,

    thanks for it. For me it only works at the end with a %f -> not ("%f")
    For me its very interesting to apply windows office 2010 updates. But they all failed when trying to apply the word/excel%.cab there is always an error.

    Do you have a practice to apply office updates into a .wim?

    Thanks in advice,
    Henning

    1+

  13. Author
    Joseph Moody 3 years ago

    I don't have specific practice with 2010 updates. With Office, I will grab the latest Service Pack and stick it in the Updates Folder in the install. I then roll that into a reference image or task sequence step.

    0

  14. eric 3 years ago

    I have a captured image that I need to update. It wants to work but get's to about 60% then fails with this error. DSIM filed no operation was performed. So far 2 were successful and the rest 50+ failed. Should I run it again?

    0

    • Author
      Joseph Moody 3 years ago

      Hey Eric,

      Try to isolate the update that is causing the error.

      0

  15. Martyn T. Keigher 3 years ago

    Hey,

    Great guide here man! I am however having an issue with all the update's aside from the first 2 (same issue as Eric it seems!?) They all error out. Was you able to work past this Eric?, or, Joseph, can you please elaborate on "Try to isolate the update that is causing the error.", as most of the update's are erroring.

    PS: I am using '%f' (as suggested in the comments) at the end of the 2nd cmd line, as '%u' didnt work for me either.

    Thanks!
    Martyn K.

    1+

  16. Author
    Joseph Moody 3 years ago

    Hi Martyn - I am glad you like this guide! I never heard back from Eric.

    What OS are you patching? About how many updates are you slipstreaming?

    You can control the updates that are patched by removing items in \\UPDATEDMACHINE\C$\Windows\SoftwareDistribution\Download

    1+

  17. Geoff 3 years ago

    Hey Joseph thanks for this guide

    Is it possible to copy just the cab files to a central directory and add them from there or do they have to be located with all the other files that were unpacked?

    I ask because I am getting an error on each add-package call, 800f0816

    0

  18. Hector 3 years ago

    Hey, Joseph. Many thank yous for your article. It got me started in the right path faster than others I found online. All this MDT/WDS stuff is hard to cobble together especially when pressed for time. With that said, all the commands ran fine, however I blasted the image onto a box and none of the updates got installed. I ran the commands against the captured and the install images.

    Prior to starting this process, the original capture image already had 183 updates installed. After running the dism commands and imaging a box, the number of updates remained the same. That's how I'm able to tell the injected updates didn't take. Maybe you or someone else here has seen this before. Thanks in advance.

    0

  19. Author
    Joseph Moody 3 years ago

    Geoff - I would keep them in their directories.

    0

  20. Author
    Joseph Moody 3 years ago

    Hi Hector - you are right about MDT/WDS stuff getting confusing. Try adding SCCM to the mix as well. 🙂

    I haven't seen that before - did you see any errors in the command prompt when you were injecting them?

    0

  21. Andrew 3 years ago

    I am currently testing this out as this is an interesting approach. The only issue that I am running into, which may be the cause of issues others above are running into, is that many of the CABs that are downloaded by Windows Update are EXPRESS cabs which do not actually have the actual update held within them and cannot be used for DISM integration. When you update do you get these files too or are you somehow getting the full cab files?

    Thanks!

    0

  22. Author
    Joseph Moody 3 years ago

    In that case, I would look at the KB number that isn't installing and grab the files from the Windows Update Catalog:
    http://catalog.update.microsoft.com/v7/site/Home.aspx

    0

  23. Mark 3 years ago

    If a file was updated multiple times by Microsoft, does this process apply the updates in sequence so the newest update is applied last?

    0

  24. Andrew Lubchansky 3 years ago

    Thank you for the response Joseph, however the majority of the patches are the EXPRESS cabs. Out of 183 downloaded patches, I would say 160 are EXPRESS. Downloading the patches manually for each of them would be a bear, as in your early comments in the article. Can you check your cabs to see if they are the same? Just curious if all 180ish of yours deploy correctly using the EXPRESS cabs.

    0

    • Stanislav Dubrovskiy 4 months ago

      Hi Jeff and all forum members,

      I have played around and found a way to download actual CAB and MSU files and integrate them into the image, using the suggested DISM technique.

      Head to GOOGLE and search for WSUS Offline. This is a great peace of software that lets you download update files for specific OS. The file are not express in CAB and MSU format.
      Use the option in WSUS Offline to copy downloaded files to let's say C:\Updates
       Follow the instructions in this article and when you get to the point that you need to type in the command to inject the updates to the Image use the following two commands:

      0

  25. Author
    Joseph Moody 3 years ago

    Mark: It process in the order found in \\UPDATEDMACHINE\C$\Windows\SoftwareDistribution\Download\

    Andrew: I can't check my environment anymore as I've switched jobs and now use SCCM to inject patches into my WIMs as part of the monthly update cycle (http://technet.microsoft.com/en-us/library/hh397283.aspx)

    As of the time of this article though, they did inject in. But Microsoft might have changed something on their side.

    0

  26. Author
    Joseph Moody 3 years ago

    Andrew: Do you have WSUS setup? If so, see if those patches that are downloaded are the express MSUs. If not, you could point your script at that content location.

    0

  27. Author
    Joseph Moody 3 years ago

    Just checking back with you Andrew. I think the problem with the express updates is that the source computer was synced with Windows Update and not WSUS (without express updates enabled).

    Can you confirm?

    0

  28. DF 3 years ago

    Joseph,

    I can confirm that WSUS with express updates disabled will provide the required non-express cabs. Public windows updates provides mostly express updates.

    1+

  29. Carlos 3 years ago

    Hi.

    I found your way of doing it very interesting and straight forward.

    My issue is: I get an error every time!!!!

    Deployment Image Servicing and Management tool
    Version: 6.3.9600.17031

    Error: 4390

    An error occurred while attempting to start the servicing process for the image located at r:\Mount.
    For more information, review the log file.

    The DISM log file can be found at C:\Windows\Logs\DISM\dism.log

    -----

    LOG:

    [3600] ImageUnmarshallHandle: Reconstituting wim at r:\temp\install.wim.
    [3600] ImageUnmarshallHandle: Reconstituting wim at r:\temp\install.wim.
    2014-11-20 14:56:24, Info DISM DISM Manager: PID=3600 TID=6104 physical location path: r:\Mount - CDISMManager::CreateImageSession
    2014-11-20 14:56:24, Error DISM DISM Manager: PID=3600 TID=6104 Failed to create unique image session lock name for DISM located at 'r:\Mount\Windows\System32\Dism\dismprov.dll'. - CDISMManager::CheckSessionAndLock(hr:0x80071126)
    2014-11-20 14:56:24, Error DISM DISM Manager: PID=3600 TID=6104 Failed to create the image session lock for location: r:\Mount\Windows\System32\Dism - CDISMManager::CreateImageSession(hr:0x80071126)
    2014-11-20 14:56:24, Error DISM DISM.EXE: Could not load the image session. HRESULT=80071126
    2014-11-20 14:56:24, Error DISM DISM.EXE: Unable to start the servicing process for the image at 'r:\Mount'. HRESULT=80071126
    2014-11-20 14:56:24, Info DISM DISM.EXE: Image session has been closed. Reboot required=no.

    Thanks in advance for your help!

    0

  30. Author
    Joseph Moody 3 years ago

    How far into the script do you get? It appears you aren't even getting the install.wim mounted in the first line. Is that true?

    0

  31. Carlos 3 years ago

    Hi, Joseph

    Thanks for the reply!

    1st my specs: 32GB RAM (where 20GB are allocated for my RAMDRIVE) and Windows 8.1 x64 Update 1 (and all the latest updates too including KB3000850 ~ 700MB in size).
    ADK for Windows 8.1 (full updated).

    2nd My steps: I copy (with 7zip) the install.wim from my ISO (MS official ISO from windows 8.1 with update 1) to my R: drive (that’s the RAMDRIVE where things go really fast). The file is in the ‘Sources’ folder.
    1- I managed to extract the info from the install.wim as shown below:

    R:\>dism /get-wiminfo /wimfile:r:\install.wim

    Deployment Image Servicing and Management tool
    Version: 6.3.9600.17029

    Details for image : r:\install.wim

    Index : 1
    Name : Windows 8.1 Pro
    Description : Windows 8.1 Pro
    Size : 12 597 421 853 bytes

    The operation completed successfully.

    R:\>
    2- I managed to mount the file:
    R:\>dism /mount-wim /wimfile:r:\install.wim /mountdir:r:\mount /index:1

    Deployment Image Servicing and Management tool
    Version: 6.3.9600.17029

    Mounting image
    [==========================100.0%==========================]
    The operation completed successfully.

    R:\>

    3-Now the fun starts. Get info on the mounted file:

    R:\>dism /get-mountedwiminfo

    Deployment Image Servicing and Management tool
    Version: 6.3.9600.17029

    Mounted images:

    Mount Dir : r:\Mount
    Image File : r:\install.wim
    Image Index : 1
    Mounted Read/Write : Yes
    Status : Ok

    The operation completed successfully.

    R:\>

    4-Trying to service it 🙁

    R:\>dism /image:r:\Mount /add-package /packagepath:r:\patches\Windows8.1-KB3000850-x64.msu

    Deployment Image Servicing and Management tool
    Version: 6.3.9600.17029

    Error: 4390

    An error occurred while attempting to start the servicing process for the image located at r:\Mount.
    For more information, review the log file.

    The DISM log file can be found at C:\Windows\Logs\DISM\dism.log

    R:\>

    5-I get this specific error everytime!!! Even if I change the .msu or .cab update. I can’t get this error out (4390)!!

    6- Now to ‘unmount’ the image:
    R:\>dism /unmount-wim /mountdir:r:\Mount /discard

    Deployment Image Servicing and Management tool
    Version: 6.3.9600.17029

    Image File : r:\install.wim
    Image Index : 1
    Unmounting image
    [==========================100.0%==========================]
    The operation completed successfully.

    R:\>

    7-I am not using ‘/commit’ because I am not able to apply any updates.

    8-I created a Windows 7 x64 virtual machine (vbox) and I get the same result. Once and only once it applied one update (.cab), I don’t know how because it was doing this some 4390 error over and over.
    Thanks for your time, Joseph
    Best regards,

    Carlos.

    0

  32. Carlos 3 years ago

    Hello, Joseph

    Well, I finally made it!!!

    It looks like it doesn’t like the RAMDRIVE (although it’s NTFS formatted and never gave me any kind of issues with other apps).
    If I redirect the ‘mount’ dir to my C: drive, everything works great!
    Take a look:
    ------------------------

    R:\>dism /get-wiminfo /wimfile:r:\install.wim

    Deployment Image Servicing and Management tool
    Version: 6.3.9600.17031

    Details for image : r:\install.wim

    Index : 1
    Name : Windows 8.1 Pro
    Description : Windows 8.1 Pro
    Size : 12 597 421 853 bytes

    The operation completed successfully.

    R:\>dism /mount-wim /wimfile:r:\install.wim /mountdir:c:\mount /index:1

    Deployment Image Servicing and Management tool
    Version: 6.3.9600.17031

    Mounting image
    [==========================100.0%==========================]
    The operation completed successfully.

    R:\>dism /get-mountedwiminfo

    Deployment Image Servicing and Management tool
    Version: 6.3.9600.17031

    Mounted images:

    Mount Dir : c:\mount
    Image File : r:\install.wim
    Image Index : 1
    Mounted Read/Write : Yes
    Status : Ok

    The operation completed successfully.

    R:\>dism /image:c:\Mount /add-package /packagepath:r:\patch\

    Deployment Image Servicing and Management tool
    Version: 6.3.9600.17031

    Image Version: 6.3.9600.17031

    Processing 1 of 1 - Adding package r:\patch\Windows8.1-KB2934018-x64.msu
    [==========================100.0%==========================]
    The operation completed successfully.

    R:\>dism /unmount-wim /mountdir:c:\Mount /commit

    Deployment Image Servicing and Management tool
    Version: 6.3.9600.17031

    Image File : r:\install.wim
    Image Index : 1
    Saving image
    [==========================100.0%==========================]
    Unmounting image
    [==========================100.0%==========================]
    The operation completed successfully.

    R:\>
    -----------------------------------------
    I was having problems with Winreducer8.1 too. Perhaps the problem is the RAMDRIVE (driver?).
    Big thanks for your support.
    Maybe, this post will save someone a lot of time if they are using a RAMDRIVE.

    Best regards,

    Carlos

    0

  33. Author
    Joseph Moody 3 years ago

    That is awesome Carlos! And thank you for posting your solution - it will certainly help someone else!

    0

  34. Carlos 3 years ago

    Hi, Joseph

    I'am using this RAMDRIVE ---> http://reboot.pro/files/file/284-imdisk-toolkit/

    It's free and a great tool. Never had a glitch with it until "dism".

    I don't know about other RAMDRIVE's software. Perhaps, if somebody else is using another driver, please post the results.

    This RAMDRIVE is an excellent HHD/SSD life saver. It really avoids a lot read/writing on these drives. You'll love a RAMDRIVE if you work with large files like ISOs and compressed files.

    My customized Win81 is now 6.46GB in size (has 87 slipstreammed updates).

    It would be great to have something like this for Office 2013 (right now it has over than 2GB in updates).

    Thanks for a great tutorial here. Keep up!

    Carlos.

    0

  35. ferrix 3 years ago

    I confirm that the "express" cabs will not work with DISM. For the moment I am using "Windows Updates Downloader" (http://www.windowsupdatesdownloader.com/) to grab all available updates for my platform and dump them into a single folder. Then I use the above instructions to DISM mount/loop/commit . Haven't finished yet to prove that it all completely works and installs, but I thought I'd at least share my findings while I'm waiting for the packages to add 🙂

    This procedure is not perfect, because the downloader's list files are not updated instantly (as of this writing, it is like 3 months out of date). But it's a lot better than having to hunt up 100 download links myself.

    I can barely believe Microsoft makes this so difficult. Not every case is suitable for WSUS or SCCM. But without arcane knowledge and a ton of utilities it's nearly impossible to start with an updated image!

    0

  36. ferrix 3 years ago

    Also, user-contributed (more up to date sometimes) lists for above tool, at http://www.msfn.org/board/forum/166-user-contributed-update-lists/

    0

  37. Alex T 3 years ago

    I couldn't get this method to work reliably. In the end I've turned to a two-prong method.
    Download the updates using Windows Update Downloader - http://www.windowsupdatesdownloader.com/, and then build my image using NTLite (beta) - http://www.ntlite.com/
    NTLite seems to use DISM when it builds the image, but can do a lot of the customisation for you.

    0

  38. Carlos 3 years ago

    Hi,

    Is there a preferred order to integrate updates (general, hotfix, security, SP)????

    Thanks in advance.

    Carlos

    0

  39. ferrix 3 years ago

    It seems to me that it would be most sensible to go in chronological order of release, in that manner trying to prevent anything new from being overwritten with something older. I don't know how likely that is, but the documentation suggests that using DISM may not respect ordering and dependencies: "You can either apply an unattend answer file to the offline image, or you can add or remove the package directly from the command prompt. If you are installing multiple packages to a Windows image, and there are dependency requirements, the best way to ensure the correct order of the installation is by using an answer file"

    0

  40. Author
    Joseph Moody 3 years ago

    Carlos - always start with an installation media with the latest Service Pack already integrated. From there, the integration order doesn't really matter.

    Ferris - That does make the most sense. If you are using SCCM (or have this ability elsewhere), you can build a list of updates that excludes expired and replaced packages.

    0

  41. William Petti 3 years ago

    Great article! I'm stuck...I can mount the .wim fine but when I go to the next step and use the command:

    Start /w for /R \\UPDATEDMACHINE\C$\Windows\SoftwareDistribution\Download\ %f in (*.cab) do DISM /image:C:\Mount /add-package /packagepath:”%f”

    After I insert the name of my machine it opens a new cmd but justs sits there and does nothing. I also tried pointing the it to my local machine to get the updates and it says that it can't find the file specified.
    Any help would be great! Thanks.

    William

    1+

  42. Author
    Joseph Moody 3 years ago

    Thank you William!

    First, can you browse to \\UPDATEDMACHINE\C$\Windows\SoftwareDistribution\Download\ ?

    If so, can you RDP into that machine, mount the WIM file there, and run the above start command?

    0

  43. William Petti 3 years ago

    Thanks Joseph.

    I did as you instructed on the local machine. The first update processes successfully but every one after that says "The system cannot find the file specified"

    William

    0

  44. Author
    Joseph Moody 3 years ago

    When it imports the update and fails, can you browse to the exact path specified in the command?

    0

  45. William Petti 3 years ago

    Yes sir I can.

    I let it run through and some of them processed but the majority failed.

    William

    0

  46. Author
    Joseph Moody 3 years ago

    Are you using express cabs? See the comments above on that issue.

    0

  47. William Petti 3 years ago

    Thanks for your help Joseph! I was using express cabs. I finally got the full cabs downloaded last night so I'm moving forward.

    BTW I just started reading DeployHappiness. Who are you...haha?? This is good stuff!

    William

    0

  48. Author
    Joseph Moody 3 years ago

    Awesome! And thank you! 🙂

    0

  49. William Petti 3 years ago

    I've been a sys admin for 14 years and most of the time I think I know everything but then I meet someone like you and realize I don't know anything!

    Thanks again.

    0

  50. Author
    Joseph Moody 3 years ago

    🙂 I stand on the shoulders of giants.

    0

  51. Recep Baltaş 3 years ago

    BTW, Windows 8.1 Update 3 is out for MSDN subs. But after a fresh install, you still have to perform 30+ updates.

    0

    • Author
      Joseph Moody 3 years ago

      Thanks! I am very glad that Microsoft is catching up on this. Hopefully, it will be extended to XP.

      0

  52. William Petti 3 years ago

    I was able to download the Windows Update .msu's and extracted the full cabs.

    Whenever I run this command I get the error. The system cannot find the file specified.

    Has anyone run into this?

    0

    • Author
      Joseph Moody 3 years ago

      I haven't seen that one yet - within the same command prompt, can you browse to those files?

      0

  53. William Petti 3 years ago

    Joseph,

    I can browse to those files. This is the command I'm running.

    C:\Windows\system32>Start /w for /R \\n32605\C$\Windows\SoftwareDistribution\Dow
    nload\ %f in (*.cab) do DISM /image:C:\Mount /add-package /packagepath:%f

    0

  54. Remco 3 years ago

    Joseph,

    I have the same problem as William, when I run the command the packages return an error around 60%. Not all of them but the most of them fail. Any idea?

    0

  55. Author
    Joseph Moody 3 years ago

    Are you using express updates?

    1+

  56. William 3 years ago

    Remco, Joseph,

    I downloaded the full cabs but now when I run the command it says "The system cannot find the file specified."

    0

  57. Remco 3 years ago

    Joseph,

    Done it like you explained. Installed windows 8.1 and got the updates through windows update, installed them used this command.

    Start /w for /R \\UPDATEDMACHINE\C$\Windows\SoftwareDistribution\Download\ %f in (*.cab) do DISM /image:C:\Mount /add-package /packagepath:”%f”

    When I look into the Softwaredistribution folder I see the cabs. So do not really know what you mean by express updates.

    0

  58. Author
    Joseph Moody 3 years ago

    William: Your problem sounds like a permissions issue. Can you run the command on the machine that you are pulling the updates from? If you can, run it as the local administrator and move the WIM to a local folder.

    0

  59. Author
    Joseph Moody 3 years ago

    Remco: Get the KB number of an update that is failing. Then go to http://catalog.update.microsoft.com/v7/site/Home.aspx and download that update. See if you can import just that one update into a WIM.

    0

  60. Gabriel Clifton 3 years ago

    On adding update packages, I use this to sort the updates based on date instead of for /r
    for /f %%f in ('dir /b /o:d

    0

  61. Author
    Joseph Moody 3 years ago

    Good tip Gabriel!

    0

  62. Jorge 3 years ago

    Great article! But i have a problem: I slipstreamed successfully about 150 updates but when I try the new ISO in a VM, then freshly-installed Windows 7 prompts to install all updates again! What am I doing wrong?

    0

  63. Author
    Joseph Moody 3 years ago

    Hi Jorge - it sounds like one of two problems to me. I would rerun the slipstream and save the command output to a text file. When you do this, make sure that each update is actually loaded into the WIM. Then make sure that the WIM successfully commits and saves the changes.

    0

  64. William 3 years ago

    Whenever I run DISM, I can mount the WIM, and then when I run the second step, "Start /w for /R [. . .]" the program will find the *.cab files, but will mostly stop at any where from 60-70% and throw out the error 0x800f0816. As far as I can tell, this is just another super generic Windows Update failure. Each of the updates will fail around the same percent, do you have any idea what could cause this or how to fix it?

    0

  65. Mike 3 years ago

    Hi Joseph,

    I got the same issue like Jorge,
    I do a successful mount, then use cabs from wsusoffline which install successful (100% according to dism) in a proportion of ~75% out of ~187 cabs, some of them refuse to install because "they are not intended ....", but that's fine.
    Then, I integrate successful Intel chipset drivers.
    Then I do a successful unmount with commit.
    Use oscdimg.exe to get it back as .ISO
    Now, installing on a real machine is working fine except the fact that in "Windows Updates-> View update history" is blank and "Installed updates" has only 2 updates.
    Is weird because not even Intel drivers seem to install, which are 100% tested onto machine.
    Checking for updates will trigger almost the same number of updates as the original SP1 .iso
    Also my msdn w7x64sp1 .iso is 3.09GB and my slipstreamed .iso is 3.99GB.
    Before posting, I did this process twice with the same end result.

    PS. I would post dism log file but.... no option.

    0

  66. Author
    Joseph Moody 3 years ago

    Mike/William: I haven't forgotten about your problem yet - I am working on an updated script and article now. It should be ready in the next week or so.

    0

  67. San 3 years ago

    Hi,
    I have the same issues as Jorge "I slipstreamed successfully about 180 updates but when I tried the new ISO on a laptop, Windows 7 prompts to install all updates again!" I have gone through the DISM process 3 time each time being successful, but its still not working for me. I am updating the install.wim from an ISO downloaded from MS VLSM

    0

  68. Andrew 3 years ago

    San, Mike and Jorge,

    Make sure the the index of the install.wim you are updating with DISM is the one you are actually installing.

    For example from my Windows 7 Ultimate iso:

    Details for image : c:\images/instal

    Index : 1
    Name : Windows 7 HOMEBASIC
    Description : Windows 7 HOMEBASIC
    Size : 11,710,161,360 bytes

    Index : 2
    Name : Windows 7 HOMEPREMIUM
    Description : Windows 7 HOMEPREMIUM
    Size : 12,222,587,449 bytes

    Index : 3
    Name : Windows 7 PROFESSIONAL
    Description : Windows 7 PROFESSIONAL
    Size : 12,122,886,417 bytes

    Index : 4
    Name : Windows 7 ULTIMATE
    Description : Windows 7 ULTIMATE
    Size : 12,285,492,779 bytes

    0

  69. Mike 3 years ago

    Hi, Joseph, thank you for your reply.
    I thought that might be the issue.
    I did another slipstream in index:3 with updates provided by WUD (WUD provided more updates as .msu, which needed unpacking as .cab) this time, but I didn't had the time to test it. I'll be back with feedback 🙂
    If this was the issue, then I'm disappointed. I was hoping that all editions of windows would get updated.

    PS. Microsoft should have done this for all of us or get a Service Pack every 1-2 yrs.

    0

  70. Author
    Joseph Moody 3 years ago

    They are starting to move that way now. I am hopeful that they will start releasing regularly updated WIMs for us to use.

    0

  71. San 3 years ago

    Hi Andrew, Thank you for the info, the issue was with the index number being selecting, but all working now.

    0

  72. Benjmain 3 years ago

    I'm trying to do this for windows 7 x64 and keep getting the following

    Image Version: 6.1.7600.16385

    Processing 1 of 1 - Adding package Package_for_KB2861191~31bf3856ad364e35~amd64~
    ~6.1.1.0
    [===========================62.5%==== ]
    An error occurred - Package_for_KB2861191 Error: 0x800f0816

    Error: 0x800f0816

    DISM failed. No operation was performed.
    For more information, review the log file.

    The DISM log file can be found at C:\Windows\Logs\DISM\dism.log

    C:\Program Files (x86)\Windows Kits\8.1\Assessment and Deployment Kit\Deployment
    Tools>DISM /image:C:\Mount /add-package /packagepath:"\\carbontest\C$\Windows\S
    oftwareDistribution\Download\7f1b420097983fbb1f283b68f4f1779e\windows6.1-kb28932
    94-x64-express.cab"

    Deployment Image Servicing and Management tool
    Version: 6.3.9600.17029

    Image Version: 6.1.7600.16385

    Processing 1 of 1 - Adding package Package_for_KB2893294~31bf3856ad364e35~amd64~
    ~6.1.1.1
    [===========================63.2%==== ]
    An error occurred - Package_for_KB2893294 Error: 0x800f0816

    Error: 0x800f0816

    DISM failed. No operation was performed.
    For more information, review the log file.

    The DISM log file can be found at C:\Windows\Logs\DISM\dism.log

    C:\Program Files (x86)\Windows Kits\8.1\Assessment and Deployment Kit\Deployment
    Tools>DISM /image:C:\Mount /add-package /packagepath:"\\carbontest\C$\Windows\S
    oftwareDistribution\Download\81b80f6a81d826a058dde28ed40719e5\windows6.1-kb29849
    72-x64-express.cab"

    Deployment Image Servicing and Management tool
    Version: 6.3.9600.17029

    0

  73. JF Martel 3 years ago

    Just did the whole thing. Awesome. It goes into Windows and the task sequence halt on the Windows Update process (Post-Application Installation) but does not continue...

    Am I missing something?

    0

  74. JF Martel 3 years ago

    Quick update, after waiting 10+ minutes... it finally resumed!

    0

  75. Dave 3 years ago

    Is this procedure vaild for every edition?
    I have an AIO .wim with all editions of Windows 7 x86.
    Can I use the same .cab for all editions?
    Thanks,
    Dave

    0

  76. Author
    Joseph Moody 3 years ago

    I'm only done this for Professional and Enterprise as those are the only two editions supported in a domain.

    0

  77. Author
    Joseph Moody 3 years ago

    JF Martel: That's awesome! That step can take a bit of time!

    1+

  78. Recep 3 years ago

    Why would anyone try to slipstream updates into 7 when there is already up to date 8.1.3 exist ? I am trying to slipstream updates into 8.1.3.

    0

  79. Author
    Joseph Moody 3 years ago

    I don't really understand your question Recep - can you rephrase it?

    0

  80. Recep Baltaş 3 years ago

    Perfect article but I don't understand people who insist on Windows 7. Windows 8.1.3 has all the updates included. So, instead of tying to slipstream hundreds of updates into W7, people should just try 8.1 Update 3. You need just 50 updates to slipstream.

    0

  81. Author
    Joseph Moody 3 years ago

    Thanks Recep! I agree on that - some organizations may not have access to 8.1 (due to funds, tech, etc).

    0

  82. Kyle Beckman 3 years ago

    There's also a lot of additional support overhead that goes into moving to Windows 8.1 in an organization. Many functional, non-technical, employees are going to require training on how to use the new Windows 8.1 interface. There are also a lot of OS changes that are going to require updates to things like systems management, corporate applications, and a lot of other things I can't mention in a blog comment. In large organizations, it isn't as simple as just installing the newest thing.

    0

  83. Willliam 3 years ago

    Very true Kyle.

    0

  84. Hector 3 years ago

    Hi Joseph. My co-worker and I are revisiting this process. It kind of fell off the radar due to other "more important" projects. Pfftt! 🙂 Anyway, after dissecting the commands and your article plus everyone's comments, it looks like it's working for us. The only 1 thing that seemed odd was the progress indicator stopping at 65% on some of the updates; others did run to 100%. We attributed that to dism seeing that update was already installed. As always, your input and everyone's are welcome. Thanks.

    0

  85. Author
    Joseph Moody 3 years ago

    I would say those updates aren't applicable to be installed. Glad that everything else worked for you though!

    0

  86. Spork Schivago 3 years ago

    Joseph, this is a great article. I've seen programs that automate the slipstreaming parts by using dism for you. I ran into a problem after slipstreaming the updates and thought maybe you could help me figure out what to do. After I slipstream, I try installing windows 7 x64 bit. The original install.wim is from a SP1 retail (or OEM) disc. The error message I get is "Windows could not configure one or more system components. To install windows, restart the computer and then restart the installation". Every time the PC restarts, it gives me the same error message. I cannot install 7. I started looking around in the C:\Windows\System32\Panther directory and after looking through some log files, it seems the problem is caused by the updates requiring .NET Framework 4.5 but .NET Framework 4.5 not being on the disc. There seems to be about 45 messages saying .NET Framework 4.5 isn't found. I cannot figure out how to tell which updates require .NET Framework 4.5 though. Is there an easy way to figure this out? Or is there a way to slipstream .NET Framework 4.5 onto the installation disc so the updates get installed? Thanks for the help!

    0

  87. Author
    Joseph Moody 3 years ago

    Thank you Spork - check out the revised script here: https://4sysops.com/archives/use-the-dism-powershell-cmdlets-or-sccm-to-slipstream-updates/

    Let me know if it fixes your problem.

    0

  88. Spork Schivago 3 years ago

    Thank you for the quick reply Joseph. I've never used Windows PowerShell before and I'm having some troubles following the tutorial you linked me to. I start up Windows PowerShell ISE (not the x86 version). I try running the Mount-WindowsImage command but every time, I get a command not found error message. I also tried it in just normal PowerShell (not the ISE version) and ran across the same problem. The system I'm running PowerShell ISE on is a Windows 7 x64 Home Premium. I even tried installing the Windows Assessment and Deployment Kit. It said it included the DISM module for Windows 7, among some other versions of Windows. I believe the commands in the link you provided would work in PowerShell ISE for Windows 8. I just don't have any Window 8 systems. Any suggestions? Thanks for the help!

    0

  89. Spork Schivago 3 years ago

    I also should of mentioned that before I was running a much older version of PowerShell. I just upgraded to version 4. For some reason, I thought Windows Update installed PowerShell version 4. Even with version 4, I still cannot get the Mount-WindowsImage command to run. Here's the version:
    PS C:\Windows\system32> $PSVersionTable.PSVersion

    Major Minor Build Revision
    ----- ----- ----- --------
    4 0 -1 -1

    Here's the error message I get:

    Mount-WindowsImage
    Mount-WindowsImage : The term 'Mount-WindowsImage' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
    At line:1 char:1
    + Mount-WindowsImage
    + ~~~~~~~~~~~~~~~~~~
    + CategoryInfo : ObjectNotFound: (Mount-WindowsImage:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

    0

  90. Spork Schivago 3 years ago

    I finally figured it out! I had to run:

    set-executionpolicy unrestricted

    Import-Module "c:\Program Files (x86)\Windows Kits\8.1\Assessment and Deployment Kit\Deployment Tools\AMD64\DISM"

    After that, the Mount-WindowsImage command shows up as valid! I'll let you know if the updates work or not once I finish integrating them.

    0

  91. Author
    Joseph Moody 3 years ago

    Awesome!!

    0

  92. Andre P 3 years ago

    I love it.
    I have used the windows update download manager to download all the patches to c:\temp\updates and then modified the script to :

    start /w for /R c:\temp\updates %f in (*.msu) do DISM /image:c:\mount /add-package /package-path:"%f"
    works like a charm, it is applying all the updates at the moment.

    thanks all !!

    0

  93. Hector 3 years ago

    "Windows Update Download Manager"? What the What?

    Can you please share how you cobbled the download portion together? Thanks.

    I would like to just download the latest x64 updates and nothing else.

    0

  94. Andre P 3 years ago

    windows update download manager - I did not know it either, but someone else mentionned it in the forum and it works good

    http://www.windowsupdatesdownloader.com/

    0

  95. andre p 3 years ago

    Oops one typo in the commandline

    start /w for /R c:\temp\updates %f in (*.msu) do DISM /image:c:\mount /add-package /packagepath:”%f”

    no "-" (minus) in the /packagepath

    so in full:
    copy all files from the "old" windows 7 CD to c:\win7

    then you could use a batchfile which will mount the install.wim, then applies the patches and then saves/commits the updates:

    dism /mount-wim /wimfile:"C:\win7\Sources\install.wim" /mountdir:C:\Mount /index:1

    start /w for /R c:\temp\updates %f in (*.msu) do DISM /image:c:\mount /add-package /packagepath:”%f”

    Dism /unmount-wim /mountdir:C:\Mount /commit

    now you have updated the files to windows 7 SP1 and all later updates.
    next step is to create a new ISO which can be done using ImgBurn
    http://forum.imgburn.com/index.php?showtopic=11194

    and last step is to use microsofts utility to burn an ISO to a USB stick
    https://www.microsoft.com/en-us/download/windows-usb-dvd-download-tool

    last comment: I did the above for 64 bit windows 7.
    it seems windows 7 32 bit is slightly different. the service pack was an executable (downloaded by the Windows Updates Downloader) so I used the following page to first "manually" apply SP1
    http://superuser.com/questions/249275/slipstream-windows-7-service-pack-1

    0

  96. Hector 3 years ago

    Oh that website. Heh! 🙂 Yes, used it too but came up short on updates plus I need Office updates as well. Cool utility nonetheless. I pointed DISM to our WSUS server and it took 12+ hours to update the image. I have to figure out how to filter for just the Windows 7 x64 architecture. Our server has updates for Server 2008, Server 2012, XP, Office, etc.

    0

  97. Tom 3 years ago

    Hi,

    Thanks for all the info. Whilst I can mount the image and run the command successfully, so far it has been running for nearly 9 hours and has still not completed. My machine has been unusable during this time so I have been using another one. I have had a couple of errors with DISM crashing and I briefly get to see the command prompt window, but it appears to have only parsed 2 of the 70 updates so far and seeing as it crashed I'm not sure it has even applied them.

    Have you ever experienced this? Originally I had tried downloading them from the WSUS Catalog and injecting them individually but that was giving me error code 0x8007002.

    Appreciate any help you can give.

    Thanks
    Tom

    0

  98. Author
    Joseph Moody 3 years ago

    I have not seen that before Tom - you may want to try this on a clean VM.

    0

  99. Lord_Pinhead 2 years ago

    Hi, thanks for the heads up. I still have an AIO USB drive with Windows 7 where i install all my PC's from my friends and family. Patchlevel is December 2013.. so its pretty darn old..

    I download all updates wie WSUS Offline Updater at my home server (Debian Lenny) and share it with Samba to the network. So, if i have to reinstall a PC, install the Edition and Patch it first offline with local patches.

    Now i thought, how could i bring them into my default installation media (USB Drive)? Your howto popped up, i give it a try, but i had one major problem: the install.wim is now nearly 9 GB 🙁

    I have all 5 editions on that stick with 32 and 64 Bit. With the patches to 12/2013 it was 6,4 GB. Thats a real bummer. Do i really need to apply the patches to all 5 Windows Editions ?

    Another thought was, setting up an WinPE Install Environment on my PXE, so i can install the whole thing over network 🙂

    0

  100. Author
    Joseph Moody 2 years ago

    See the reset base parameter in this link. It should help you: https://technet.microsoft.com/en-us/library/hh825265.aspx

    0

  101. Jeff Bowman 2 years ago

    Well now this is strange!

    In the entire C:\Windows\SoftwareDistribution hierarchy on a fully patched Win8.1 machine, I have only one—one—KB update:

    windows8.1-kb2976978-v10-x64-express.cab

    What's to be made of it?

    Thanks,
    Jeff Bowman
    Fairbanks, Alaska

    0

  102. Author
    Joseph Moody 2 years ago

    Any chance your machine had updates slipstreamed into before hand (or you ran the resetbase command in powerhsell)?

    0

  103. Jeff Bowman 2 years ago

    > Any chance your machine had ...

    Not a chance. Big mystery, that.

    Guess I'll just have to find another way to get 'em. Great article!

    Thanks,
    Jeff Bowman
    Fairbanks, Alaska

    0

  104. Author
    Joseph Moody 2 years ago

    Thank you Jeff!

    0

  105. Jeff Bowman 2 years ago
  106. Author
    Joseph Moody 2 years ago

    Thank you for posting back this solution Jeff!

    0

  107. Jeff Bowman 2 years ago

    You're welcome 🙂

    Joe Wright's post doesn't replace yours here—they're just two different ways of tackling the same sticky problem.

    Thanks,
    Jeff Bowman
    Fairbanks, Alaska

    0

  108. Andrew Huddleston 2 years ago

    I inject the packages PRE starting the machine.

    First download the monthly ISO packages from https://support.microsoft.com/en-au/kb/913086.

    Then mount the ISO and mount the VHD/X.

    Then run something like, where h: is the ISO drive and g: is the VHDX.

    dir h: -Recurse -Include *.msu,*.cab | ForEach-Object {Add-WindowsPackage -PackagePath
    $_.FullName -Path g: -LogPath .\packages.log -LogLevel 2}

    0

  109. Author
    Joseph Moody 2 years ago

    Thank you for your solution Andrew!

    0

  110. BlueCamo 2 years ago

    Joseph, what exactly does the %U% or %F% reference after the /packagepath? Thanks.

    0

  111. Author
    Joseph Moody 2 years ago

    It is a foreach loop.

    I should probably re-write this in PowerShell completely.

    0

  112. A Kofoed 2 years ago

    I'm trying this, but it give an error when running the command

    Start /w for /R \\DEPLOYMENY-64\C$\Windows\SoftwareDistribution\Download\ %f in (*.cab) do DISM /image:C:\Mount /add-package /packagepath:

    tried the /packagepath:%f and %u and with and without ""

    keep getting the errors:

    -------------------------------------------------------------------------
    C:\Windows\System32>DISM /image:C:\Mount /add-package /packagepath:"%U"

    Deployment Image Servicing and Management tool
    Version: 6.3.9600.17031

    Image Version: 6.1.7601.18489

    An error occurred trying to open - "%U" Error: 0x80070003

    Error: 3

    The system cannot find the path specified.

    The DISM log file can be found at C:\Windows\Logs\DISM\dism.log

    -----------------------------------------------------------------------------

    C:\Windows\System32>DISM /image:C:\Mount /add-package /packagepath:\\DEPLOYMENY-
    64\C$\Windows\SoftwareDistribution\Download\1a72828373c82bbf5de3f9525ce6dce8\ie1
    1-windows6.1-kb3093983-x64-express.cab

    Deployment Image Servicing and Management tool
    Version: 6.3.9600.17031

    Image Version: 6.1.7601.18489

    Processing 1 of 1 - Adding package Package_for_KB3093983~31bf3856ad364e35~amd64~
    ~11.2.1.0
    [===========================66.1%====== ]
    An error occurred - Package_for_KB3093983 Error: 0x800f0816

    Error: 0x800f0816

    DISM failed. No operation was performed.
    For more information, review the log file.

    The DISM log file can be found at C:\Windows\Logs\DISM\dism.log

    ""
    VersionComp: EQ, ServiceComp: EQ, BuildComp: EQ, DistributionComp: GE, RevisionComp: GE, Exist: present
    2015-10-16 09:55:43, Info CBS Appl: detectParent: package: Package_31_for_KB3037574~31bf3856ad364e35~amd64~~6.1.1.0, no parent found, go absent
    2015-10-16 09:55:43, Info CBS Appl: detect Parent, Package: Package_31_for_KB3037574~31bf3856ad364e35~amd64~~6.1.1.0, Parent: WinEmb-NetFx20~31bf3856ad364e35~amd64~hr-HR~6.1.7601.17514, Disposition = Detect, VersionComp: EQ, ServiceComp: EQ, BuildComp: EQ, DistributionComp: GE, RevisionComp: GE, Exist: present
    2015-10-16 09:55:43, Info CBS Appl: detectParent: package: Package_31_for_KB3037574~31bf3856ad364e35~amd64~~6.1.1.0, no parent found, go absent
    2015-10-16 09:55:43, Info CBS Appl: detect Parent, Package: Package_31_for_KB3037574~31bf3856ad364e35~amd64~~6.1.1.0, Parent: WinEmb-NetFx20~31bf3856ad364e35~amd64~lt-LT~6.1.7601.17514, Disposition = Detect, VersionComp: EQ, ServiceComp: EQ, BuildComp: EQ, DistributionComp: GE, RevisionComp: GE, Exist: present
    ""

    I can't find any help threads for this issue?

    0

  113. SCott 2 years ago

    I tried the command as it was displayed and had the same problem as A Kofoed. This worked for me.
    1. mounted the image to C:\Mount
    2. Opened elevated command prompt
    3. Start /w for /R C:\Windows\SoftwareDistribution\Download\ %F in (*.cab) do DISM /image:C:\Mount /add-package /packagepath:"%F"
    I think he had "%U" which did not seem to work. Maybe a typo?

    0

  114. A Kofoed 2 years ago

    SCott: its not a typo, since i tried both %F and %U with and without "" (se my post again)

    I now tried this on the Updated PC and it does the same error, this is fustrating

    0

  115. miki43 2 years ago

    Hey i think you are too much complexed with this for loop.You could easily write this like this (Start /w for /R "%windir%\SoftwareDistribution\Download\" %f in (*.cab) do DISM /image:C:\Mount /add-package /packagepath:%f).But it looks like in DISM quotes make error in both first one and for loop too so i tried every one of them without quotes and it works.

    0

  116. Karl Thornley 2 years ago

    Re: Express updates. In an SCCM environment you can get around this by using the appropriate update package as a source for the CABs. If you're using WSUS, you can use the WSUS content subfolder. However, you'll also pick up a load of Office updates in all likelihood which won't install by this method. Alternatively, set up a subordinate WSUS server, configure it only to sync OS updates with your main server, approve the required updates on this server then use its content subfolder once it's finished downloading.

    0

  117. Karl Thornley 2 years ago

    Incidentally, I also find that sometimes DISM hangs after installing an update with the last line in the logfile being 'Releasing the local reference to DISMLogger. Stop logging. - CDISMProviderStore::Internal_DisconnectProvider' - you have to kill the DISM process for it to go on to the next update. If you don't, DISM uses all the available CPU for a while and gradually increases in memory use. Sometimes it falls out the end, sometimes not.

    0

  118. michael 2 years ago

    I am following your guide, and I can't get it working, maybe I am doing something wrong. I get the message: An error occured tring to open - % Error: 0x80070003. Doesn't matter if I tried -%f or "%f" or "%u" --- no idea what I am doing.

    Here is the step I took:

    1) copy os image to c:\
    2) mounted image (had to figure out what all these paths were, was getting error: 123)
    3) used your "The easier way to slipstream Windows updates" (had to find out how to get pc name)
    4) I get the message An error occured tring to open - % Error: 0x80070003

    After some googling, someone asked the question if they are using WinPE or Windows. I am doing this via Windows OS (active). Was I supposed to uses some software like WinPE? Didn't see it mention here. A dummy step by step guide would be appreciated.

    0

  119. Author
    Joseph Moody 2 years ago

    I'm not sure exactly why you are getting that error but you don't need to be in Windows PE for this script to run.

    1+

  120. Anonymous 2 years ago

    I am not sure if it is relevant, but this error appears to be an association of being used by windows system; at least that's what google says.

    0

  121. michael 2 years ago

    googling says its being used by system OS as the reason why this error.

    0

  122. Ray 2 years ago

    Hi i just used this command to update a windows 7 ultimate wim.

    I removed the "%U" at the end of the linde and replaced it with just a %f

    With no quotation marks and it worked fine.

    0

  123. Ray 2 years ago

    My guess is if you don't have a space in the path to your windows updates folder, then it should work with the %f variable instead of the "%U"

    0

  124. michael 2 years ago

    ok i give up on this method, all i get is more errors using %f

    0

  125. Karl 2 years ago

    I've noticed that if you view the dism.log file in, for example, Trace32.exe (SCCM Log File Viewer, very useful for monitoring logs in real time) sooner or later an update will hang on finishing and the memory usage of dism.exe will go up and up until it crashes with a memory exception.

    Leave it and don't view the log file, and its fine. Even viewing the log file from another computer causes this behaviour

    0

  126. Author
    Joseph Moody 2 years ago

    Thanks for the tip Karl! I don't think I've seen that but it is good to know.

    0

  127. Jason 2 years ago

    This works great against a WSUS repository:

    Start /w for /R \\WSUSSERVER\WsusContent %f in (*.cab) do DISM /image:C:\Mount /add-package /packagepath:%f

     

    Thanks for the post Joseph!

    0

  128. Martin 2 years ago

    PS C:\Windows\system32> Start /w for /R \\Nczi-app-01\reminst\wsusoffline1062\wsusoffline\client\ %f in (*.cab) do DISM
    /image:E:\WDS\tempWimMount /add-package /packagepath:”%U”
    *.cab : The term '*.cab' is not recognized as the name of a cmdlet, function, script file, or operable program.

    What I doing wrong?

     

    0

    • Spork Schivago 2 years ago

      I don't know if this is your problem or not Martin, but what you posted:

      Start /w for /R \\Nczi-app-01\reminst\wsusoffline1062\wsusoffline\client\ %f in (*.cab) do DISM /image:E:\WDS\tempWimMount /add-package /packagepath:”%U”
      At the end there, you're using the wrong double quotes.  You're using ” instead of ".   Maybe you copied and pasted the original example and modified it instead of typing it manually?   Perhaps replacing the ”'s with " would fix the problem for you.   Best of luck.

      0

  129. Spork Schivago 2 years ago

    I just noticed in my reply, my double quotes showed up as quotes with the top leaning towards the right.   They're supposed to be straight up and down.   If you copy and paste the command into something like notepad, you'll see the difference between the double quotes in the command versus the double quotes that's created with the keyboard.  Just copy and paste the double quote and then hit the double quote on the keyboard.   It'll show you the difference.

    0

  130. Blake 2 years ago

    Joseph (or anyone who knows why this might be happening)

    I am unable to service a Windows 7 x64 .WIM image created using Smart Deoploy's capture process.  It captures a .WIM of the .VMDK (VMWare virtual machine file) and I am trying to service that .WIM

    So far I have been successful in mounting the .WIM to a folder on root C:\Updates in this example and I can even add packages from a "package path" that I downloaded using a combo of WSUSOffline and my onsite WSUS server to determine which updates to download.  I have about 204 updates to apply yet when I go to apply I am given this error;

    "Error 0x800f081e"

    As well as when I try to commit the image I get

    Error 32 this process is in use (I have waited overnight to try to commit to see if it's a timing thing)

    I have posted a snippet of my log file here;

    DISM Log

    Anyone curious / know my issue and wanna help!?

    Cheers,

    Blake

    0

  131. ipguy 1 year ago

    is it possible to slipstream updates into a live system ?

    0

    • Author
      Joseph Moody 1 year ago

      Use WUSA.exe. Below is an example.

      wusa.exe KBNAME.msu /quiet /norestart

      0

  132. Tyler Watthanaphand 1 year ago

    I dont think this works anymore. I'm getting lots of Error: 0x800f0816

    0

  133. Pablo 1 year ago

    Hi,

     

    Same here trying to do with Windows server 2012 R2, around 230 updates and also 0x800f0816.

     

    A pitty...

     

    Pablo

    0

  134. Thomas Berg 1 year ago

    Thanks for this great post Joseph!

    Here's some tips that summarizes what others have said here and adds some details. It should also help those that get the 0x800f0816 errors. I've put some important text in bold so it's easier to spot if you want to browse through the post quickly later.

    The reason for the 0x800f0816 error seems mostly to be that people are trying to slipstream express patches which means that the files doesn't contain the full patch. 

    My recommendation is to use WSUS Offline Update (http://download.wsusoffline.net/) to download the patches. Some people above have recommended the Windows Updates Downloader tool but it currently seems to have very outdated patch lists so I wouldn't recommend that now as of July 19th 2016 when this was written.

    To use WSUS Offline Update download the zip file from the link above and unzip somewhere. I'll use C:\wsusoffline\ in my examples so replace the path in the examples if you use something else.

    Run C:\wsusoffline\Updategenerator.exe , click on the options you want and click Start and wait for it to finish. It will take a while.

    NOTE: Even though WSUS Offline Update downloads xml files from Microsoft with patch lists it still might not include the very latest patches so you'll have to run Windows Update after patching and note down which KBs you're still missing and download them manually if you want to include everything up until today. As new patches are most likely just around the corner it's probably a waste of time though.

    Updates will be stored in subfolders under C:\wsusoffline\client\ with names matching the Windows version. Eg. Windows 7 64Bit will be stored under C:\wsusoffline\client\w61-x64\ so that's the path you tell DISM to look in.

    In case someone doesn't know, Windows 7 has version number 6.1 hence the w61-x64 name (https://msdn.microsoft.com/en-us/library/windows/desktop/ms724832(v=vs.85).aspx)

    Here's the list of folders WSUS Offline Update creates under D:\wsusoffline\client\ for the different OS versions you choose. The folders without -x64 are the 32 bit ones.

    w61, w61-x64 : Windows 7 and Windows Server 2008 R2

    w62-x64 : Windows Server 2012

    w63, w63-x64: Windows 8.1 and Windows Server 2012 R2

    w100, w100-x64: Windows 10 and Windows Server 2016

    Here's the command lines I use to patch Windows 7 64 bit. One for the *.cab files and one for the *.msu. I think you need both to get all patches. Replace D:\patch\wim with the path you mounted the wim file on. Make sure you run the command in a window with administrative rights.

    for /R C:\wsusoffline\client\w61-x64 %f in (*.cab) do DISM /image:D:\patch\wim /add-package /packagepath:%f

    for /R C:\wsusoffline\client\w61-x64 %f in (*.msu) do DISM /image:D:\patch\wim /add-package /packagepath:%f

    NOTE: Some of the patches downloaded by WSUS Offline Update will most likely not be applicable to whatever particular version you are patching so some will fail.

    Consider using NTLite to patch instead of DISM (https://www.ntlite.com/download/) as it has a GUI and can also do some other stuff like automation, turning features on and off and remove individual patches from the list before updating the wim file.

    Here's a quick list of what you need to do in NTLite to patch

    1. Choose Add->Image file and browse to the install.wim file you want to patch

    All the indexes in the wim files should now be listed in the main window with gray dots in front of them. Some have just one and others can have several (Like Windows 7 Home, Pro, Ultimate etc)

    2. Double-click on the index you want to mount and patch

    When this is done the dot in from of the index should be green and you should have new menu items in the left column.

    3. To add a whole folder with patches (including subfolders) click on Updates under the Integrate heading and then in the top left corner click Add->Folder and subfolder found packages. Browse to for instance C:\wsusoffline\client\w61-x64\ for Windows 7 64 bit patches and click Select Folder

    You can also add drivers and other items.

    4. When you want to write all the changes to the wim click Apply at the bottom on the left column and then click Process in the top left corner

    5. Enjoy your victory with a cold beverage 😀

     

    Hopefully this is helpful to someone 🙂

     

    Regards

    Thomas Berg

    1+

  135. Author
    Joseph Moody 1 year ago

    Very good tips Thomas! I appreciate you taking the time to put all of that together.

    0

  136. Al 1 year ago

    Very complete guide. Except for the typo since it should be %f in the for loop at the very end.

    Since I also had trouble installing most of the updates with dism I set up a WSUS server and used its found updates as source. Now it works fine integrating them with dism.

    2+

  137. Valerian Crasto 1 year ago

    Hi, I have created Slipstream for Windows 2012 Std R2 64bit and injected 322 patches.

    created ISO with oscdimg -n -m -bE:\systemutil\Win2k12R2\boot\etfsboot.com E:\systemutil\Win2k12R2 E:\systemutil\base\windowsSS.iso but its not booting. ISO size is 8.30GB.

    0

    • mark 1 year ago

      The ISO is not a bootable Windows which was not explained. YOu need the boot file extracted from your original Windows ISO using program such as WinISO and adding to the created one.

      0

  138. Author
    Joseph Moody 1 year ago

    Thank you Al!

    0

  139. mark 10 months ago

    It's %%f  not %f  in a batch file to work correctly!

    0

  140. Jeff May-Stahl 8 months ago

    This fails on all updates but windows updates. Is there anyway to install all the office updates, etc?

    0

Leave a reply to Joseph Moody Click here to cancel the reply

Your email address will not be published. Required fields are marked *

*

CONTACT US

Please ask IT administration questions in the forum. Any other messages are welcome.

Sending
© 4sysops 2006 - 2017

Log in with your credentials

or    

Forgot your details?

Create Account