Where Customization Begins 

  • Edit the registry on a mounted WIM

  • Windows® Automated Installation Kit (WAIK), Windows System Image Manager (WSIM), Win PE and Windows Assessment and Deployment Kit (ADK) Tutorials are right here.
Windows® Automated Installation Kit (WAIK), Windows System Image Manager (WSIM), Win PE and Windows Assessment and Deployment Kit (ADK) Tutorials are right here.
 #14664  by Buster67
 19 Mar 2011, 17:03
An oldie but a goodie – this came about again when creating Windows 7 WIM files for SCCM. It really does save a lot of time – otherwise you would need to deploy your image, make changes to the registry and then recapture. This process is much quicker! I use the DISM tool from the WAIK toolkit but you could also use imageX to mount the image.

Steps:

Mount the WIM

Open the Deployment Tools Command prompt and enter:

Code: Select alldism /mount-wim /wimfile:d:\temp\test.wim /index:1 /mountdir:c:\mount


Result:

Code: Select allD:\>dism /mount-wim /wimfile:d:\temp\test.wim /index:1 /mountdir:c:\mount
Deployment Image Servicing and Management tool
Version: 6.1.7600.16385
Mounting image
[==========================100.0%==========================]
The operation completed successfully.


Load the registry hive

From a command prompt enter:

Code: Select allreg load HKLM\test c:\mount\windows\system32\config\software


Result:

Code: Select allD:\>reg load HKLM\test c:\mount\windows\system32\config\software
The operation completed successfully.


Open regedit

You will then see the registry that is contained in the WIM file, in this case it is called test. Make your changes, then exit regedit.

Image

Unload the registry hive

From a command prompt enter:

Code: Select allreg unload HKLM\test


Result:

Code: Select allD:\>reg unload HKLM\test
The operation completed successfully.


Unmount the image

Open the Deployment Tools Command prompt and enter:

Code: Select alldism /unmount-wim /mountdir:c:\mount /commit


Result:

Code: Select allD:\>dism /unmount-wim /mountdir:c:\mount /commit
Deployment Image Servicing and Management tool
Version: 6.1.7600.16385
Image File : d:\temp\test.wim
Image Index : 1
Saving image
[==========================100.0%==========================]
Unmounting image
[==========================100.0%==========================]
The operation completed successfully.
 #14666  by nice_guy75
 19 Mar 2011, 17:13
I have also found this tutorial but this one is confusing me mate. When I open the regedit after loading registry hives I see the registries of my host OS itself, secondly when I tried to merge reg file I get msg "Can't Import, Error accessing registy"
 #18456  by odinlives
 11 Aug 2011, 23:38
I haven't tried this one but will definitely bookmark this and try on my next build. Normally I go the old fashion route and make on huge reg file to be loaded upon initial install but this way is definitely a more solid way by the looks of it.

@nice_guy have you worked out the error you were getting?
 #18457  by Neuropass
 11 Aug 2011, 23:47
nice_guy75 wrote: secondly when I tried to merge reg file I get msg "Can't Import, Error accessing registy"


That is probably because the Reg entries you are trying to import involve different registry section. you can only import reg entries for that specific section that you loaded.

Example:

Code: Select allHKLM = HKEY_LOCAL_MACHINE
HKCU = HKEY_CURRENT_USER


Etc... :coo:
 #18471  by nice_guy75
 12 Aug 2011, 05:27
Neuropass wrote:
nice_guy75 wrote: secondly when I tried to merge reg file I get msg "Can't Import, Error accessing registy"


That is probably because the Reg entries you are trying to import involve different registry section. you can only import reg entries for that specific section that you loaded.

Example:

Code: Select allHKLM = HKEY_LOCAL_MACHINE
HKCU = HKEY_CURRENT_USER


Etc... :coo:

Thanks mate, I have already solved my problem and already posted similar tutorial for integrating Font in the Install.wim, over here:
Code: Select allhttp://www.tweakscene.com/viewtopic.php?f=127&t=5176