SOLVED: How to Edit The Registry in an Offline Windows 10 WIM File

If you have built a corporate image and found that you need to make a change to settings in the registry you can edit the registry off line.  In my case I use WSUS to deploy images so I had to find the image I needed to modify in WSUS, right click and select EXPORT IMAGE.  I named that export WIN10-PreRDPFix.WIM .

You can load and modify HKLM registry using the following commands:

  1. Create a C:\TEMP and a C:\TEMP\MOUNT folder
  2. Launch DEPLOYMENT AND IMAGING TOOLS ENVIRONMENT as an administrator.  If you do not have the deployment tools then click HERE to get them directly from Microsoft.
  3. Enter Dism.exe /mount-wim /wimfile:C:\temp\<NameOfYourWim.wim> /index:1 /mountdir:C:\temp\mount
  4. Enter reg load HKLM\test c:\mount\windows\system32\config\software
    or
    reg load HKLM\test c:\mount\windows\system32\config\system
    or
    reg load HKLM\test c:\mount\windows\system32\config\drivers
    or
  5. Launch REGEDIT and expand HKLM\TEST
  6. Make your changes and close REGEDIT
  7. Enter reg unload HKLM\test
  8. Enter Dism /unmount-wim /Mountdir:C:\Temp\mount /commit
  9. Import your .WIM back into whatever deployment solution you are using.  In my case, I went to WSUS, right clicked on the image in question and selected REPLACE IMAGE

If you need to load a driver in an offline WIM image, including a PXE boot image click HERE for details.  You might also find this basic DISM instruction from Microsoft to be helpful.

View Comments

  • Worked like a champ. Note to others, DEPLOYMENT AND IMAGING TOOLS ENVIRONMENT can be a pain to get installed on an off-line machine or VM. Powershell has the functionality and the syntax is almost exactly the same.
    Thanks - what a lifesaver.

Published by
Ian Matthews

This website uses cookies.