Using DISM to add IE 9 to an existing WIM file

Posted: 24th March 2011 by Seth Killey in Windows 7

I try to update our standard Windows 7 image after major releases such as service packs or new releases of Internet Explorer.  In the past I usually just take my reference computer install the service pack or IE update and then run sysprep and imagex to create my standard image so I can easily build a computer after a crash or virus.  However, this time around I tried using DISM to inject IE9 into my standard image without the whole production of recreating my wim file using sysprep and imagex. First I downloaded the proper IE9 installation file and ran

  • IE9-Windows7-x86-enu.exe /x:C:\Users\username\Desktop\Updates (in my instance I uses 32 bit version of Windows and IE)

After the files have been extracted to the Updates folder you can delete all but the IE9-Win7.CAB file.  Next, download the file from KB article 2454826 and put it in the Updates folder which is a necessary update in conjunction with IE9.  You should be left with only 2 files.  Finally, run the following general steps, replacing the necessary text to fit your particular scenario.  After running the first command, take note of the name displayed because it must match the /name parameter in step 2.

  • Dism /Get-WIMInfo /WimFile:C:\Users\username\Desktop\Sources\Win7ProSP1.wim
  • Dism /Mount-WIM /WimFile:C:\Users\username\Desktop\Sources\Win7ProSP1.wim /Name:”Windows 7 Pro SP1″ /MountDir:C:\img
  • Dism /Image:C:\img /Add-Package /PackagePath:C:\Users\username\Desktop\Updates
  • Dism /Unmount-WIM /MountDir:C:\img /commit

That should just about do it.  Just use the updated wim file and apply to your reference computer using your Windows PE startup disk and imagex tool.

For information on creating a Boot Windows PE from CD-ROM
For information on creating a Standard Image of Windows 7