1.    05 Sep 2017 #1
    Join Date : Sep 2017
    Phoenix, AZ
    Posts : 12
    Windows 10 Enterprise 64 bit

    Edit registry on a mounted wim


    Can anybody tell me how to modify the registry on a mounted wim? I keep getting Access denied. This is the command I am using: reg load hkey_local_machine\software c:\test\offline\windows\system32\config\software

    We have Windows 10 64 bit Enterprise edition.
      My ComputerSystem Spec
  2.    05 Sep 2017 #2
    Join Date : Aug 2014
    Forever West
    Posts : 3,921
    Win10 Home and Pro, Win10 Insider Preview, Win7 Home, Linux Mint

    A useful feature of the Enterprise Edition [what companies usually get] is the ability to lock out Users from various aspects which begs the question, could that be getting in your way? Other than that possibility I have no answer.
      My ComputerSystem Spec
  3.    05 Sep 2017 #3
    Join Date : Jul 2015
    Posts : 3,694
    10 Pro

    I do it like this (where $WorkDir is directory where the wim is mounted)
    PHP Code:
    # Registry Changes
    reg load HKLM\WinPE_SYSTEM   $WorkDir\mount\windows\system32\config\SYSTEM
    reg load HKLM
    \WinPE_SOFTWARE $WorkDir\mount\windows\system32\config\SOFTWARE

    $RegKey
    ="HKLM\WinPE_SOFTWARE\Microsoft\NetSh"
    reg add  $RegKey /v wlancfg /t REG_SZ /d wlancfg.dll /
    Can you post the error - what are you not authorized to? Presumably you are running as administrator...
      My ComputerSystem Spec
  4.    05 Sep 2017 #4
    Join Date : Sep 2017
    Phoenix, AZ
    Posts : 12
    Windows 10 Enterprise 64 bit
    Thread Starter

    I am running as administrator:

    C:\Program Files\Windows AIK\Tools\PETools>dism /mount-wim /wimfile:c:\test\images\64Win10Ent-1511-IHSlogo.wim /index:1 /mountdir:c:\test\offline

    Deployment Image Servicing and Management toolVersion: 6.1.7600.16385

    Mounting image
    [==========================100.0%==========================]
    The operation completed successfully.

    C:\Program Files\Windows AIK\Tools\PETools>reg load hkey_local_machine\software
    c:\test\offline\windows\system32\config\software
    ERROR: Access is denied.
    Last edited by PaulaJava; 05 Sep 2017 at 14:39. Reason: Formatting lost in copy paste from Notepad
      My ComputerSystem Spec
  5.    05 Sep 2017 #5
    Join Date : Jul 2015
    Posts : 3,694
    10 Pro

    You are trying to load your offline image to the existing HKLM\SOFTWARE hive. You can't - you need a new unused name.

    Make up another name like HKLM\WinPE_SOFTWARE and it works fine like this (the name doesn't matter - it just must not already exist):
    Code:
    PS C:\WINDOWS\system32> dism /mount-wim /wimfile:D:\Temp\install.wim /index:1 /mountdir:C:\test\offline
    
    Deployment Image Servicing and Management tool
    Version: 10.0.16281.1000
    
    Mounting image
    [==========================100.0%==========================]
    The operation completed successfully.
    PS C:\WINDOWS\system32> reg load hkey_local_machine\SOFTWARE c:\test\offline\windows\system32\config\software
    ERROR: Access is denied.
    PS C:\WINDOWS\system32> reg load HKLM\SOFTWARE c:\test\offline\windows\system32\config\software
    ERROR: Access is denied.
    PS C:\WINDOWS\system32> reg load HKLM\WinPE_SOFTWARE c:\test\offline\windows\system32\config\software
    The operation completed successfully.
    PS C:\WINDOWS\system32>
    Then update HKLM\WinPE_SOFTWARE or whatever name you chose like this (with whatever you want)
    Code:
    $RegKey="HKLM\WinPE_SOFTWARE\Microsoft\NetSh"
    reg add  $RegKey /v wlancfg /t REG_SZ /d wlancfg.dll /f
    
    $RegKey="HKLM\WinPE_SOFTWARE\Microsoft\Windows NT\CurrentVersion\Svchost"
    reg add $RegKey /v LocalSystemNetworkRestricted /t REG_MULTI_SZ /d Netman\0hidserv\0svsvc\0dot3svc\0wlansvc /f
    Unload the hive you mounted
    Code:
    reg unload HKLM\WinPE_SOFTWARE
    and unmount the wim (I forget the dism syntax)
    Code:
    # Unmount the WinPE image
    Get-WindowsImage -Mounted -ErrorAction Stop | ForEach-Object {
    	Dismount-WindowsImage -Path $_.Path -Save -ErrorAction Stop
    }
      My ComputerSystem Spec
  6.    06 Sep 2017 #6
    Join Date : Sep 2015
    Posts : 8
    WIndow 10

    Hello

    Can I safely mount my 10 Pro install.wim and remove some apps and make HKCU and HKLM registry changes and use that to upgrade machines via SCCM? Or can this only be used in a clean full install? I have had sucess with an install.wim I removed some of the apps from but none that I have changed some of the registry keys to turn off privacy related setting I get a BSOD

    Thanks
      My ComputerSystem Spec
  7.    07 Sep 2017 #7
    Join Date : Sep 2017
    Phoenix, AZ
    Posts : 12
    Windows 10 Enterprise 64 bit
    Thread Starter

    Saweet! It mounted successfully. Now I need to figure out the syntax for turning the numlock on at boot up.

    Thank you LXO.
      My ComputerSystem Spec
  8.    07 Sep 2017 #8
    Join Date : Aug 2014
    Forever West
    Posts : 3,921
    Win10 Home and Pro, Win10 Insider Preview, Win7 Home, Linux Mint

    Quote Originally Posted by PaulaJava View Post
    Saweet! It mounted successfully. Now I need to figure out the syntax for turning the numlock on at boot up.

    Thank you LXO.

    Is it possible the numlock Tutorial [in the Tutorials section of this Forum] would work for your purpose. I find that function works to Save State or if the numlock is On at shutdown it usually be be On at the next start.
      My ComputerSystem Spec
  9.    07 Sep 2017 #9
    Join Date : Sep 2017
    Phoenix, AZ
    Posts : 12
    Windows 10 Enterprise 64 bit
    Thread Starter

    I was able to make changes in HKLM such as UAC turned off. But I can't seem to be able to load HKEY_USERS\.DEFAULT so I can modify the keyboard and turn on numlock at start up. Any thoughts?
      My ComputerSystem Spec

 


Similar Threads
Thread Forum
Solved Virtual hard disk can't be mounted ...
Hello everybody, recently I've installed Windows 8,1 Pro version on my laptop and today I'm trying to install Microsoft Office 2007 Enterprise. I've have it on CD but when I'm trying to run it there's a message that says : "Virtual hard disk...
Virtualization
Edit in registry = no log in prompt/safe mode only!! Help please
Hello my windows 10 laptop was being fixed by a agent through remote control access they asked me to delete a USB driver folder in my registry upon restarting my log in has been missing the restore and reset options fail but recognize a key is...
User Accounts and Family Safety
Please help if you can. How to edit FOLDER tooltips in the registry.
I have already inquired about this in the past, but I can't seem to get a response from anyone. I would really appreciate some help with this please :). In order to customize which fields/properties are displayed in the tooltips for any given...
Customization
HELP! - Custom Icon for a Mounted Volume
All I want to do is assign a custom icon to a Mounted Volume folder/drive. Here is what I've tried so far... 1) I have a secondary SSD with 3 volumes (Documents, Pictures, Music). I used "Mount into an empty NTFS folder" to mounted each one into...
Customization
Cant Edit or Write to Registry
I have been working with windows 10 X64 PRO for a little bit now. I can still not figure out why my scripts (.vbs) or .exe that I push to or use on my domain machines will not edit or create keys in the registry. The only way i can do it is to full...
Performance & Maintenance
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd
All times are GMT -5. The time now is 01:45.
Find Us
Twitter Facebook Google+ Ten Forums iOS App Ten Forums Android App



Windows 10 Forums