Editing the registry of your WIM without having to recapture

I often get asked if it is possible to edit the registry of my captured OS (in WIM format) without actually having to apply the image and then recapture it.  Well, yes it is possible, and here is how to do it.

  1. Mount your WIM file with ImageX:

    imagex /mountrw myOS.wim 1 c:\mount

  2. Load the desired registry hive (in this example it is Software):

    reg load HKLM\mykey c:\mount\windows\system32\config\software

  3. Now your can open regedit to make the changes, use "reg add" or import directly a .reg file.

  4. Next, we unload the registry:

    reg unload HKLM\mykey

  5. Then we commit the changes back to the WIM file:

    imagex /unmount /commit c:\mount

And that's it, couldn't be simpler!