none
Windows Update / Hotfix Injection into Windows 7 WIM image for Deployment

    Question

  • I'm looking for some kind of "official" Microsoft documentation or TechNet article explaining the proper process for injecting Windows Updates / Hotfixes into a Windows WIM image to allow me to deploy a version of windows that already has all (or at least most) of the current windows updates.

    Does anyone know if such a document exists? Or perhaps someone from Microsoft can respond to this post with some well documented steps on how I would accomplish this?

    Thanks!

    Thursday, April 29, 2010 11:41 PM

Answers

  • Process

    WSUS Offline Tool
    1. Download the WSUS Offline Tool and extract to another working directory, e.g. "C:\wsusoffline"
    2. Run the "UpdateGenerator.exe" tool.
    3. Select the version of Windows you wish to update, e.g. "x64 Global" under the Windows 7 category.
    4. Optionally select to use a WSUS server on your local network with the "WSUS..." button.
    5. Press the "Start" button. A command window will appear displaying the progress of the utility. The updates are downloaded to the "./client/w61-x64/glb" directory within the "wsusoffline" folder.
    The Windows 7 Media
    1. Download the Windows Automated Installation Kit for Windows 7 and install. This will allow you to obtain the "DISM.exe" command line utility that is needed.
    2. Extract all files from the Windows 7 media. Store these files in a working directory, e.g. "C:\Win7_x64_Ent_Source"
    3. Create a temp directory that will be used to mount the WIM image to in order to manipulate the files, e.g. "C:\Win7_x64_Ent_WIM"
    4. Open an elevated command prompt.
    5. Run the follow command to mount the WIM file:
      dism /mount-wim /wimfile:C:\Win7_x64_Ent_Source\sources\install.wim /mountdir:C:\Win7_x64_Ent_WIM /index:1
      
      • You can determine the index number of the image you need to mount by running the "dism /get-wiminfo" command.
    6. Change your current working directory to the directory you downloaded the updates to, e.g. "C:/wsusoffline/client/w61-x64/glb"
    7. Run the command:
       dism /image:"C:\Win7_x64_Ent_WIM" /Add-Package /PackagePath:"C:/wsusoffline/client/w61-x64/glb"

      This command will step through each update file in the directory, adding the update to the currently mounted WIM file.

    8. Run the following command to commit the changes and close the WIM image.
       dism /unmount-wim /mountdir:C:\Win7_x64_Ent_WIM /commit 
      • Note: If you think something has gone wrong or you do not wish to actually inject these updates, you can replace the "/commit" flag with the "/discard" flag and your changes will not be saved to the WIM file.
    • Marked as answer by n8felton Friday, April 30, 2010 4:58 PM
    • Edited by n8felton Friday, April 30, 2010 4:59 PM Removed * typo
    Friday, April 30, 2010 4:55 PM

All replies

  • Process

    WSUS Offline Tool
    1. Download the WSUS Offline Tool and extract to another working directory, e.g. "C:\wsusoffline"
    2. Run the "UpdateGenerator.exe" tool.
    3. Select the version of Windows you wish to update, e.g. "x64 Global" under the Windows 7 category.
    4. Optionally select to use a WSUS server on your local network with the "WSUS..." button.
    5. Press the "Start" button. A command window will appear displaying the progress of the utility. The updates are downloaded to the "./client/w61-x64/glb" directory within the "wsusoffline" folder.
    The Windows 7 Media
    1. Download the Windows Automated Installation Kit for Windows 7 and install. This will allow you to obtain the "DISM.exe" command line utility that is needed.
    2. Extract all files from the Windows 7 media. Store these files in a working directory, e.g. "C:\Win7_x64_Ent_Source"
    3. Create a temp directory that will be used to mount the WIM image to in order to manipulate the files, e.g. "C:\Win7_x64_Ent_WIM"
    4. Open an elevated command prompt.
    5. Run the follow command to mount the WIM file:
      dism /mount-wim /wimfile:C:\Win7_x64_Ent_Source\sources\install.wim /mountdir:C:\Win7_x64_Ent_WIM /index:1
      
      • You can determine the index number of the image you need to mount by running the "dism /get-wiminfo" command.
    6. Change your current working directory to the directory you downloaded the updates to, e.g. "C:/wsusoffline/client/w61-x64/glb"
    7. Run the command:
       dism /image:"C:\Win7_x64_Ent_WIM" /Add-Package /PackagePath:"C:/wsusoffline/client/w61-x64/glb"

      This command will step through each update file in the directory, adding the update to the currently mounted WIM file.

    8. Run the following command to commit the changes and close the WIM image.
       dism /unmount-wim /mountdir:C:\Win7_x64_Ent_WIM /commit 
      • Note: If you think something has gone wrong or you do not wish to actually inject these updates, you can replace the "/commit" flag with the "/discard" flag and your changes will not be saved to the WIM file.
    • Marked as answer by n8felton Friday, April 30, 2010 4:58 PM
    • Edited by n8felton Friday, April 30, 2010 4:59 PM Removed * typo
    Friday, April 30, 2010 4:55 PM
  • Hi

    I need some help. I have a local WSUS server at work, but I can't get my Wsus Offline 6.51 to download the updates from the local server. I'm also behind a proxy server. It only wants to connect to the internet. Do I perhaps need an internet connection first before it connects to the local WSUS for the actual files?

    Any help would be greatly appreciated.

    Wednesday, June 02, 2010 6:29 PM
  • Hi

    I need some help. I have a local WSUS server at work, but I can't get my Wsus Offline 6.51 to download the updates from the local server. I'm also behind a proxy server. It only wants to connect to the internet. Do I perhaps need an internet connection first before it connects to the local WSUS for the actual files?

    Any help would be greatly appreciated.

    This question would be better suited for the wsus offline forums, found at http://forums.wsusoffline.net/. I personally do not use proxies at work, so I don't really have a way to test this.
    Wednesday, June 02, 2010 7:35 PM
  • Thank you for the step-by-step! Truly made things easier, except I had a hard time mounting my .wim file - found out that you must EXPORT the image from WDS before you'll be able to successfully mount it with DISM.

    Friday, June 11, 2010 8:16 PM
  • Thanks for this post!
    Monday, October 11, 2010 4:44 PM
  • This works great for updates and fixes but why oh why have MS decided that you can't use this for a service pack? Tried extracting the SP and using the CAB files within but it still fails.

    Tuesday, March 01, 2011 12:40 PM
  • This works great for updates and fixes but why oh why have MS decided that you can't use this for a service pack? Tried extracting the SP and using the CAB files within but it still fails.


    because MS disabled it inside the CABs. You must use the reverse Integration method.

    "A programmer is just a tool which converts caffeine into code" CLIP- Stellvertreter http://www.winvistaside.de/
    Tuesday, March 01, 2011 3:50 PM
  • Nice find and great job writing up this tutorial! 

    Do you (or does anyone else) know what happens if you try to import a package that is already in the image?  I only ask because I created my image last month and it will only need the .CABs of the updates that have been released since then. 

    Thanks!  (and sorry for resurrecting a thread that hasn't been updated in nearly four months...but I am curious.)  ;) 

    • Proposed as answer by A.Karaer Thursday, March 22, 2012 3:31 PM
    • Unproposed as answer by A.Karaer Thursday, March 22, 2012 3:32 PM
    Wednesday, June 22, 2011 3:38 PM
  • I have injected the update/hotfixes. I also added this image to our MDT server but it's still updating the same updates/hotfixes after deploying.

    Does anybody know what to do. Is there a catalog file that i have to update.

    Thursday, March 22, 2012 3:36 PM
  • Could be that the updates were applied to the wrong index. I've done that more than once...
    Tuesday, May 15, 2012 9:16 PM
  • Okay, so now I got the finished WIM file. How do I turn C:\Win7_x64_Ent_Source into an ISO file again?
    Monday, July 01, 2013 5:10 PM