Windows 10: DISM - Edit Registry on an Offline Image

Discus and support DISM - Edit Registry on an Offline Image in Windows 10 Tutorials to solve the problem; How to: DISM - Edit Registry on an Offline Image [img] Information Servicing an offline image, mounting an image, committing changes, it all sounds... Discussion in 'Windows 10 Tutorials' started by Brink, Apr 10, 2018.

  1. Brink
    Brink New Member

    DISM - Edit Registry on an Offline Image


    How to: DISM - Edit Registry on an Offline Image

    DISM - Edit Registry on an Offline Image [​IMG]
    Information Servicing an offline image, mounting an image, committing changes, it all sounds a bit complicated to an average Windows user. However, it's just geek speak meaning modifying default Windows install image, the install.wim file. It is a straight forward procedure. When changes have been committed (written, saved) to image, the modified install.wim can be used to deploy Windows or to replace original install.wim on existing install media.

    Servicing an offline image is done with DISM (Deployment Image Servicing and Management), a native Windows tool. DISM command options allow all kind of changes, changing the way Windows will be installed. Drivers can be added or removed, language packs applied to create a multilingual Windows install media, Windows Updates applied to get a new Windows installation to be up to date straight after installation, and so on.

    This tutorial will show how to modify Windows registry on an offline image.




    Contents [/i] Use links below to go to any step, back button of your browser to return to this list.


    [table][tr][td]Step One:[/td] [td]Mount Offline Image[/td] [/tr] [tr][td]Step Two:[/td] [td]Edit Offline Registry[/td] [/tr] [tr][td]Step Three:[/td] [td]Commit (save) changes[/td] [/tr] [/table]




    Step One [/i] Mount Offline Image 1.1) Create a new folder, name it as you want to. In this example I create the folder on drive D: naming it ISO_Files.

    1.2) Mount a Windows 10 ISO image as virtual DVD by double clicking it. Open mounted ISO in Explorer, select all files and folders with CTRL + A and copy them with CTRL + C, paste the ISO content to ISO_Files folder with CTRL + V:

    DISM - Edit Registry on an Offline Image [​IMG]



    DISM - Edit Registry on an Offline Image [​IMG]


    DISM - Edit Registry on an Offline Image [​IMG]
    Note If you have Windows 10 install media on a USB flash drive, you can skip steps 1.1 & 1.2 and use it instead.
    1.3) Create a folder to mount offline image. In this example I use folder C:\Mount.

    1.4) Open elevated PowerShell (tutorial). Enter following command to check what editions are included in image:

    Dism /Get-WimInfo /WimFileDISM - Edit Registry on an Offline Image :D:\ISO_Files\Sources\install.wim

    Note the index number of your selected edition. In this example I have copied all content of Windows Insider build 16299 to ISO_Files folder. I want to use PRO edition to edit its registry, noting its index number 8:

    DISM - Edit Registry on an Offline Image [​IMG]


    1.5) Mount the image of your preferred Windows 10 edition using it's index number, index 8 in this example:

    Dism /Mount-Wim /WimFileDISM - Edit Registry on an Offline Image :D:\ISO_Files\Sources\install.wim /index:8 /MountDir:C:\Mount

    This will take some time. Please notice, the drive where the Mount folder is located needs some free space. I do not recommend mounting an image to a folder on a drive with less than 15 GB free space. For instance, mounting the multi edition build 16299.15 image requires almost 12 GB, in addition to space required to work with the image:

    DISM - Edit Registry on an Offline Image [​IMG]



    Step Two [/i] Edit Offline Registry 2.1) To be able to edit offline registry, offline registry hive you want to modify needs to be imported to a temporary hive in your host registry. In this example I will import HKLM\Software hive from offline registry to a temporary hive named OFFLINE in host registry:

    reg load HKLM\OFFLINE C:\Mount\Windows\System32\Config\Software

    Above command creates a new hive HKLM\OFFLINE in host registry importing HKLM\SOFTWARE hive from offline image to it. Replace the imported hive name with one you want to import, for instance the following command would import hive SECURITY from offline image:

    reg load HKLM\OFFLINE C:\Mount\Windows\System32\Config\Security

    You can import SOFTWARE, DEFAULT, DRIVERS, SAM or SYSTEM hives.

    2.2) Open Registry Editor (regedit) on host, you will notice it now contains temporary hive HKLM\OFFLINE:

    DISM - Edit Registry on an Offline Image [​IMG]


    2.3) Edit registry settings in temporary hive as you wish. See a practical example in this post: Add or Remove Internet Explorer Desktop Icon in Windows 10 Browsers Email Tutorials


    Step Three [/i] Commit (save) changes 3.1) When done with registry edits, unload temporary hive with following command:

    reg unload HKLM\OFFLINE

    This removes temporary hive from host registry

    3.2) Unmount offline image committing (saving) changes with following command:

    Dism /Unmount-Image /MountDir:C:\mount /Commit

    The /Commit switch takes care of saving all changes to install.wim file.

    3.3) If you were using Windows image on a USB drive, you are done. You can now install Windows 10 which by default contains changes you've made.

    3.4) If you were using image copied from an ISO image to ISO_Files folder, you can now create a new ISO using your preferred tool (Rufus for instance), or as told in Part Five in this tutorial: Create Windows 10 ISO image from Existing Installation Installation Upgrade Tutorials
    That's it geeks!

    Kari


    Related Tutorials

    :)
     
    Brink, Apr 10, 2018
    #1
  2. Barefoot Win User

    DISM - Edit Registry on an Offline Image


    I started with the HKLM\Software hive, and it loaded fine. When I attempted to load HKLM\System, access was denied.
    DISM - Edit Registry on an Offline Image [​IMG]


    Second question. Can hives other than HKLM be modified?
    I'd like to remove the shortcut name extension by going to HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer, and modifying the link BINARY to 00 00 00 00 = off, then HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\NamingTemplates, and deleting the ShortcutNameTemplate string value.
     
    Barefoot, Oct 26, 2019
    #2
  3. Barefoot Win User
    DISM - Edit Registry on an Offline Image


    Thanks. Good suggestion. I wondered if the name should be changed. Your naming suggestion makes identifying where you are in the registry easier.

    I'm still curious if changes can be made to HKEY_CURRENT_USER. Powershell only allows loading HKLM and HKU.
     
    Barefoot, Oct 26, 2019
    #3
  4. SIW2 Win User

    DISM - Edit Registry on an Offline Image

    DISM - Edit Registry on an Offline Image


    You have given them both the same name.OFFLINE.

    I suggest in future you load software hive as the name SOFT
    REG LOAD HKLM\SOFT F:\MOUNTBOOT\WINDOWS\SYSTEM32\CONFIG\SOFTWARE

    then load system hive as the name SYS
    REG LOAD HKLM\SYS F:\MOUNTBOOT\WINDOWS\SYSTEM32\CONFIG\SYSTEM

    For now, as you have loaded software hive as the name OFFLINE

    You are ok to load system hive as the name SYS.
     
  5. DavidY Win User
    DISM - Add or Remove Drivers on an Offline Image


    Ah I thought you might be doing the DISM/drivers one.

    It is good info and I use parts of this frequently when I'm reinstalling on my old hardware and need to manually add drivers.

    I would suggest DISM /Get-Drivers as an alternate to the Powershell step in 2.2 - the table format is quite useful I find.

    One method of applying the drivers I tried which seems to work (not sure how valid it is) when clean-installing a machine as a one-off:
    1. Export drivers as per Step 2
    2. Use DISM /Get-Drivers to show which driver is which, and copy only the ones I know are problematic to a subfolder, and add this subfolder to a bootable Windows 10 Setup USB
    3. Boot Windows 10 Setup from the USB
    4. Open a command prompt with Shift F10, type command 'wpeutil shutdown' but don't press enter. Instead, Alt-Tab back to Setup
    5. Follow the normal clean install process, delete partitions and let it install the relevant edition
    6. When it says Restarting in a few seconds, quickly Alt-Tab to the command prompt and press enter, to stop it restarting but shut down instead
    7. Boot again from the USB, go straight into Shift-F10, and use DISM /add-driver to add relevant drivers to the offline Windows drive as per Step 4
    8. wpeutil shutdown again, and let it restart this time, so that Windows boots and finishes configuring itself with the new drivers available to it.
    I found it easier than Mounting the image and also means I don't change the .WIM so I can use that on other hardware without fear of non-standard (and probably quite old) drivers getting in the way .

    Although in some cases I could install and change it once Windows is up and running , one of 1709's default drivers causes a BSOD during installation itself, if I don't add the alternative manually using the above technique before it gets to that point.

    But it's not a technique I've seen anywhere else so I'm probably bending the rules somewhere. *Wink
     
    DavidY, Oct 26, 2019
    #5
  6. SIW2 Win User
    DISM - Edit Registry on an Offline Image


    Not clear what you are trying to do. There is no HKCU hive. That is key on your currently running system. It is a combination of the user settings in %userprofile%\ntuser.dat and links to HKLM\Software.

    If you are trying to adjust user settings on the installation media - load users\administrator\ntuser.dat and users\default\ntuser.dat from the installation media. The ntuser.dat files are hives.

    Regedit allows you to load hives under the HKLM or HKU keys.

     
Thema:

DISM - Edit Registry on an Offline Image

Loading...
  1. DISM - Edit Registry on an Offline Image - Similar Threads - DISM Edit Registry

  2. Windows 10 dism unmount offline image failed with error 32

    in Windows 10 Installation and Upgrade
    Windows 10 dism unmount offline image failed with error 32: Hi thereI am trying to change some registry keys in an offline image BOOT.WIM as to ensure a recovery-media startup uses the right screen resolution.Therefore i use Windows Powershell admin and make some commandline entries.dism /mount-wim /wimfile:G:\SOURCES\BOOT.WIM...
  3. DISM offline source

    in Windows 10 Performance & Maintenance
    DISM offline source: Hi, I have one Win 10 system that's in perfect health, passes sfc & dism with flying colors. I have another Win 10 system, same build as the good one, that has... issues. I'd like to prepare an offline source for DISM from the good system for repairing the bad one. By...
  4. Editing the registry

    in Windows 10 Support
    Editing the registry: I migrated from win7 to win10 using the in-place method MS recommends. But as a result of that the registry is full of entries for programs that were removed years ago. What I want to do is just remove them; edit them out. I know the best way to remove them is to begin again...
  5. Editing the registry

    in Windows 10 BSOD Crashes and Debugging
    Editing the registry: I need to edit the registry to remove/expunge residual program entries after an un-install and clean-up. Background I upgraded from win7 to win10, and noted that installed apps several versions of VideoStudio failed on the 2nd and subsequent execution on win10. I've...
  6. DISM repair corrupt image offline via a DVD, Er 2 ...

    in Windows 10 Support
    DISM repair corrupt image offline via a DVD, Er 2 ...: Hiya all, I am trying to repair an image (corrupt) with DISM using an install.wim. But I keep getting error 2: "Unable to access image." ... check image path and windows directory and have read permissions on folder ... The folder is the temporary folder on X:\windows\temp...
  7. Registry Edit

    in Windows 10 Installation and Upgrade
    Registry Edit: I deleted something from registry edit. Im not too sure what, it was along the lines of Tab- or Tablet- because i was going through getting rid of anything that could be causing errors for my new tablet drivers. But now im getting a flashing screen, and white icons (or no...
  8. Using DISM to restore offline image

    in Windows 10 Installation and Upgrade
    Using DISM to restore offline image: Hi Microsoft, My windows 10 bootloader is corrupted. I receive errors 0xc0000225 and 0xc0000098 while booting. I have found different methods on internet to fix it but none of it seemed to work. I was trying to repair my image using dism.exe but the problem i am facing...
  9. dism offline repair fails with 'The cleanup-image option is unknown."

    in Windows 10 Updates and Activation
    dism offline repair fails with 'The cleanup-image option is unknown.": Hello I have a laptop that I took the HDD out of and connected it to another Windows 10 machine. I ran the command Dism /Image:e:\ /Cleanup-Image /RestoreHealth but get the error Deployment Image Servicing and Management tool Version: 10.0.10240.16384 Image...
  10. DISM - Add or Remove Drivers on an Offline Image

    in Windows 10 Tutorials
    DISM - Add or Remove Drivers on an Offline Image: How to: DISM - Add or Remove Drivers on an Offline Image [img] Information Servicing an offline image, mounting an image, committing changes, it all sounds a bit complicated to an average Windows user. However, it's just geek speak meaning modifying default Windows...

Users found this page by searching for:

  1. dism edit registry

    ,
  2. powershell wim regedit

    ,
  3. powershell offline registry wim

    ,
  4. import registry in wim image