Edit the registry contained in a Wim File

How to open a wim and edit the registry….

•Open the Deployment Tools Command Prompt (Contained in the Microsoft Windows AIK folder on your start menu)
•Mount your wim file, by entering the below command . Substitute the filename, index and mount directory for your wim filename and image index. The mount directory just needs to be an empty pre-existing directory.

dism /mount-wim /wimfile:C:\WimImages\Win7.wim /index:2 /mountdir:C:\AIKMount
•Once DISM reports that the image has been mounted successfully, you need to mount the registry. I’m going to mount the wim’s HKLM\Software hive in this example. You’ll notice the root of my reg path below is the folder I mounted the WIM into, given in the previous command. Type

•Open RegEdit and load the software registry hiver from the mounted image (it’s in the c:\windows\system32\config folder) Make your changes.
•Once you are finished, Unload the hive and exit Regedit.
•Unmount the wim image and commit the changes back into the .wim file.
dism /unmount-wim /mountdir:C:\AIKMount /commit

If you want to not save the changes use the /discard switch instead of /commit


  1. No comments yet.
(will not be published)
Subscribe to comments feed
  1. No trackbacks yet.