MSFN Forum: How to change registry in mounted image? - MSFN Forum

Jump to content



  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

How to change registry in mounted image?

#21 User is offline   TheWalrus 

  • N.W.O.
  • PipPipPipPipPip
  • Group: Members
  • Posts: 818
  • Joined: 11-August 08
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 02 August 2011 - 09:23 AM

What does /s do?




Ad HKCU - I realized it's just a subkey of HKLM in offline image, so I am just using HKEY_LOCAL_MACHINE\WIM_Software\Classes. That is right, hm?





#22 User is offline   myselfidem 

  • 2 Slow 4 You
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 1,752
  • Joined: 06-January 10
  • OS:Windows 7 x86
  • Country: Country Flag

Posted 03 August 2011 - 12:15 AM

We can use the MMC "/s" to turn off the splash screen.

http://social.techne...dc-9617d5fe3347

Other example: Edit the registry on a mounted WIM.
http://blogs.technet...ounted-wim.aspx

About Windows Registry:
http://en.wikipedia....indows_Registry

#23 User is offline   dencorso 

  • Adiuvat plus qui nihil obstat
  • Group: Super Moderator
  • Posts: 3,966
  • Joined: 07-April 07
  • OS:98SE
  • Country: Country Flag

Posted 03 August 2011 - 12:21 AM

Just for the sake of completeness:

View Postdencorso, on 31 July 2011 - 07:40 PM, said:

You can use Nuno Brito's handy RawReg to peruse unmounted registry hives, like NTUSER.DATs from other profiles than the one currently logged on. RawReg also should let you modify them, but that doesn't always work, in the current version, so If you need to do that, use Erwan.L's offlinereg instead, althought it's less user friendly.

While I wrote that with unmounted hives from other profiles in the same system, it of course applies to any unmounted hives, so certainly a mounted WIM image qualifies, too.

#24 User is offline   jaclaz 

  • The Finder
  • Group: Developers
  • Posts: 9,108
  • Joined: 23-July 04
  • OS:none specified
  • Country: Country Flag

Posted 03 August 2011 - 12:36 AM

View Postdencorso, on 03 August 2011 - 12:21 AM, said:

Just for the sake of completeness:

View Postdencorso, on 31 July 2011 - 07:40 PM, said:

You can use Nuno Brito's handy RawReg to peruse unmounted registry hives, like NTUSER.DATs from other profiles than the one currently logged on. RawReg also should let you modify them, but that doesn't always work, in the current version, so If you need to do that, use Erwan.L's offlinereg instead, althought it's less user friendly.

While I wrote that with unmounted hives from other profiles in the same system, it of course applies to any unmounted hives, so certainly a mounted WIM image qualifies, too.

With all due respect :):
  • RAWREG is unfinished (and severely bugged :ph34r:) work
  • The already mentioned Offline Registry uses a MS freely available Library and is command line, i.e. an exact correspondent to what was asked (command line editing).

Whether a command line app is less friendly than a GUI app is of course well debatable.

jaclaz

This post has been edited by jaclaz: 03 August 2011 - 12:36 AM


#25 User is offline   dencorso 

  • Adiuvat plus qui nihil obstat
  • Group: Super Moderator
  • Posts: 3,966
  • Joined: 07-April 07
  • OS:98SE
  • Country: Country Flag

Posted 03 August 2011 - 01:06 AM

View Postjaclaz, on 03 August 2011 - 12:36 AM, said:

RAWREG is unfinished (and severely bugged :ph34r:) work

I know... but it's handy, all the same, provided it's used just to peruse the hives, not to edit them. :)

View Postjaclaz, on 03 August 2011 - 12:36 AM, said:

Whether a command line app is less friendly than a GUI app is of course well debatable.

Well... that's the problem with quoting, instead of writing from scratch: some things get out of context. That comment was addressed to Dave-H, in the thread that quote originated from, not to the OP of the present thread, who asked for a command-line tool. My, bad. Sorry! :blushing:

#26 User is offline   TheWalrus 

  • N.W.O.
  • PipPipPipPipPip
  • Group: Members
  • Posts: 818
  • Joined: 11-August 08
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 03 August 2011 - 02:58 AM

I ran into a dead end with my reg tweaks - the **** file refuses to import. I only just found out when I still had no tweaks applied when I installed the system and tried to do it manually after - I keep getting an error message about registry access error or something. The mustbe something wrong with the file, I don't know :( Could someone check it out please?









edit: the /s switch does nothing, I am not getting any splash screens at all anyway...


This post has been edited by TheWalrus: 03 August 2011 - 03:08 AM


#27 User is offline   myselfidem 

  • 2 Slow 4 You
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 1,752
  • Joined: 06-January 10
  • OS:Windows 7 x86
  • Country: Country Flag

Posted 03 August 2011 - 11:47 AM

Test made successfully with your reg files:

You need first to create a folder (Example: C:\DISM_Temp) and place your reg files inside!

Example (adapt the name and paths to your needs):

Walrus.cmd
@echo off & color 1F
"C:\Program Files\Windows AIK\Tools\x86\Servicing\Dism.exe" /Mount-Wim /Wimfile:"C:\Win7\sources\install.wim" /index:1 /MountDir:"C:\zMount"
>nul timeout /t 3
reg.exe load HKLM\WIM_Default "C:\zMount\Users\Default\NTUSER.DAT"
reg.exe load HKLM\WIM_Software "C:\zMount\Windows\System32\config\SOFTWARE"
reg.exe load HKLM\WIM_System "C:\zMount\Windows\System32\config\SYSTEM"
>nul timeout /t 3 
reg.exe import "C:\DISM_Temp\User.reg"
reg.exe import "C:\DISM_Temp\Perso.reg"
reg.exe import "C:\DISM_Temp\Context_Menu.reg"
reg.exe import "C:\DISM_Temp\System.reg"
pause to see the result inside the mounted hives
>nul timeout /t 3
echo.
reg.exe unload HKLM\WIM_Default
reg.exe unload HKLM\WIM_Software
reg.exe unload HKLM\WIM_System
echo.
"C:\Program Files\Windows AIK\Tools\x86\Servicing\Dism.exe" /Unmount-Wim /MountDir:"C:\zMount" /Commit
echo.
echo ==Appuyez sur n'importe qu'elle touche pour quitter==&pause>nul



Inside C:\DISM_Temp place all you reg files (Example):

User.reg
Perso.reg
Context_Menu.reg
System.reg

Output command window Result.txt

Spoiler


Image Mounted Hives

One error corrected inside your reg file.
Your reg files attached!

This post has been edited by myselfidem: 03 August 2011 - 11:57 AM


#28 User is offline   TheWalrus 

  • N.W.O.
  • PipPipPipPipPip
  • Group: Members
  • Posts: 818
  • Joined: 11-August 08
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 03 August 2011 - 03:07 PM

I don't know man. I think I am doing pretty much the same thing.

This is what I have in my batch file:

@echo off
Color 0A
echo mounting the image
dism /mount-wim /wimfile:e:\Win7\sources\install.wim /index:1 /mountdir:e:\mount\
echo removing some minor s*** files
rd "e:\mount\Users\Administrator\Favorites\Links" /s /q
rd "e:\mount\Users\Administrator\Favorites\Microsoft Websites" /s /q
rd "e:\mount\Users\Administrator\Favorites\MSN Websites" /s /q
rd "e:\mount\Users\Administrator\Favorites\Windows Live" /s /q
rd "e:\mount\Users\Public\Music\Sample Music" /s /q
rd "e:\mount\Users\Public\Pictures\Sample Pictures" /s /q
rd "e:\mount\Users\Public\Recorded TV\Sample Media" /s /q
rd "e:\mount\Users\Public\Videos\Sample Videos" /s /q

echo loading registry from the image
reg.exe load HKLM\WIM_Default "e:\mount\Users\Administrator\NTUSER.DAT"
reg.exe load HKLM\WIM_Software "e:\mount\Windows\System32\config\SOFTWARE"
reg.exe load HKLM\WIM_System "e:\mount\Windows\System32\config\SYSTEM"
echo importing registry tweaks
reg.exe import "e:\tweaks.reg"
echo unloading the registry
reg.exe unload HKLM\WIM_Default
reg.exe unload HKLM\WIM_Software
reg.exe unload HKLM\WIM_System
echo unmounting and saving the image
dism.exe /Unmount-Wim /MountDir:"e:\mount" /Commit
pause


edit: what did you change please? I don't know of any simple way of checking the changes.

edit2: why did you break the tweaks into different files, or rather - by what logic?



This post has been edited by TheWalrus: 03 August 2011 - 03:23 PM


#29 User is offline   TheWalrus 

  • N.W.O.
  • PipPipPipPipPip
  • Group: Members
  • Posts: 818
  • Joined: 11-August 08
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 03 August 2011 - 04:03 PM

After lots of trial and error I managed to nail it down. Everytime I applied the tweaks and installed it in VM, I'd get BSOD and restart when the windows was supposed to start.

One stupid key typed slightly wrong. Jeez I'm dumblind... But then again, I've been trying to get this part working for 2 days pretty much nonstop and 3 hours a day worth of sleep is BAD.




I still have one question though: do I really need to use REG_EXPAND_CZ type for those keys that contain variables like for example %systemroot% which I am very fond of lately?


This post has been edited by TheWalrus: 04 August 2011 - 08:29 AM


#30 User is offline   myselfidem 

  • 2 Slow 4 You
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 1,752
  • Joined: 06-January 10
  • OS:Windows 7 x86
  • Country: Country Flag

Posted 04 August 2011 - 07:24 AM

View PostTheWalrus, on 03 August 2011 - 04:03 PM, said:

And last thing: are you sure all the tweaks got applied when you tried them?

Yep! :rolleyes:

Image Tweaks on mounted hives

*Edit: About switch /s and mmc.exe:
http://www.msfn.org/...post__p__108801

This post has been edited by myselfidem: 04 August 2011 - 03:49 PM


#31 User is offline   TheWalrus 

  • N.W.O.
  • PipPipPipPipPip
  • Group: Members
  • Posts: 818
  • Joined: 11-August 08
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 04 August 2011 - 08:50 AM

Damnit you managed to reply before I was done editing the post :P

(solved now, but still have a question)



#32 User is offline   myselfidem 

  • 2 Slow 4 You
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 1,752
  • Joined: 06-January 10
  • OS:Windows 7 x86
  • Country: Country Flag

Posted 05 August 2011 - 10:17 AM

View PostTheWalrus, on 03 August 2011 - 04:03 PM, said:

After lots of trial and error I managed to nail it down. Everytime I applied the tweaks and installed it in VM, I'd get BSOD and restart when the windows was supposed to start.

One stupid key typed slightly wrong. Jeez I'm dumblind... But then again, I've been trying to get this part working for 2 days pretty much nonstop and 3 hours a day worth of sleep is BAD.


I corrected your error key and I gave you a new reg files inside DISM_Temp.zip!!!!!!:P

*Edit: Error was CurrentControlSet corrected to ControlSet001 inside one key!

This post has been edited by myselfidem: 05 August 2011 - 10:23 AM


#33 User is offline   TheWalrus 

  • N.W.O.
  • PipPipPipPipPip
  • Group: Members
  • Posts: 818
  • Joined: 11-August 08
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 05 August 2011 - 12:53 PM

Yes I noticed that too, but there was something else, lol.

Btw I also tried to use a tweak to disable Windows Defender, but that totally screwed the installation process up! No OOBE screen, up to like 15 mins of waiting and then just login window. Weird.



#34 User is offline   myselfidem 

  • 2 Slow 4 You
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 1,752
  • Joined: 06-January 10
  • OS:Windows 7 x86
  • Country: Country Flag

Posted 05 August 2011 - 01:04 PM

You can set a value inside your Autounattend.xml to disable Windows Defender:
<settings pass="specialize">
<DisableAntiSpyware>true</DisableAntiSpyware> (Disables Windows Defender)

This post has been edited by myselfidem: 05 August 2011 - 01:09 PM


#35 User is offline   myselfidem 

  • 2 Slow 4 You
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 1,752
  • Joined: 06-January 10
  • OS:Windows 7 x86
  • Country: Country Flag

Posted 07 August 2011 - 06:09 AM

Other link about reg.exe and hives:

Apply regtweaks (also HKCU) and install apps for ALL users
http://www.msfn.org/...post__p__955400

#36 User is offline   TheWalrus 

  • N.W.O.
  • PipPipPipPipPip
  • Group: Members
  • Posts: 818
  • Joined: 11-August 08
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 07 August 2011 - 06:50 AM

I think I have everything registry-related sorted out by now :) Thank you.

Share this topic:


  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy