Published by

Kari's Avatar
PhD in Malt Based Liquids

Location: A Finnish expat in Germany
Posts: 13,598

Show Printable Version 

information   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.

DISM - Edit Registry on an Offline Image Contents DISM - Edit Registry on an Offline Image
 Use links below to go to any step, back button of your browser to return to this list.

Step One: Mount Offline Image
Step Two: Edit Offline Registry
Step Three: Commit (save) changes

DISM - Edit Registry on an Offline Image Step One DISM - Edit Registry on an Offline Image
 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:
Click image for larger version. 

Name:	image.png 
Views:	1170 
Size:	241.1 KB 
ID:	156995

Click image for larger version. 

Name:	image.png 
Views:	1114 
Size:	206.4 KB 
ID:	156996
Note   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 /WimFile: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:
Click image for larger version. 

Name:	image.png 
Views:	1265 
Size:	584.9 KB 
ID:	157000

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

Dism /Mount-Wim /WimFile: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:
Name:  image.png
Views: 1130
Size:  108.7 KB

DISM - Edit Registry on an Offline Image Step Two DISM - Edit Registry on an Offline Image
 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


2.2) Open Registry Editor (regedit) on host, you will notice it now contains temporary hive HKLM\OFFLINE:
Name:  image.png
Views: 1132
Size:  151.9 KB

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

DISM - Edit Registry on an Offline Image Step Three DISM - Edit Registry on an Offline Image
 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!