Jump to content

Modify Default User profile registry hive after Setup ?


Recommended Posts

Hi guys,

in Windows XP it was possible to modify the registy of the default user profile by loading the ntuser.dat like this:

REG LOAD "HKU\CUSTOM" "%ALLUSERSPROFILE%\..\Default User\NTUSER.DAT"
REG ADD "HKU\CUSTOM\Software\Microsoft\Windows\CurrentVersion\Run" /V "Test" /D "%PROGRAMFILES%\Test.exe" /F
REG UNLOAD "HKU\CUSTOM"

However, in Windows Vista, this does not work anymore. Do you guys have any idea how I can modify the default user registry after Vista Setup has finished ?

Thanks a lot for your help !

Alex

Link to comment
Share on other sites


Hi Razormoon,

thanks, will try that and let you know if it works. I just think there may be a problem with rights. At least last time I tried something similar the administrator account did not have the rights to modify the registry like this but I don´t remember the exact reason. Will try it again.

Bye,

Alex

Link to comment
Share on other sites

  • 4 weeks later...

Just saw this topic while searching for something else.

I load a custom Default profile so all users get the same settings etc. My method is prolly not supported by M$, but then most of what I do prolly isn't supported.

I take the ntuser.dat from %Users%\Default on a Vista machine and load it in regedit.

Highlight HKEY_USERS

File --> Load Hive...

Browse to the donor ntuser.dat and open.

When prompted at Load Hive dialog, call it Default_User --> Click OK

Open HKEY_USERS --> Default_User and add any HKCU settings you want to apply to all users.

Unload hive --> Copy modified ntuser.dat file to $oem$\$1\Users\Default

This modified ntuser.dat is copied to the hdd at build time, and all users logging on for the first time get these settings.

Apologies if this has already been covered in another answer.

Link to comment
Share on other sites

I don't particularly want to alter the install.wim source. I have tried this for copying files and settings etc. $oem$ style, but kept getting errors telling me the source was corrupt. I also find it an incredibly long winded way of doing things. As we only ever build machines here from RIS/WDS I find it much easier to follow the XP style convention of using the $oem$ folders - whether M$ recommend it or not.

I feel M$ have lost a lot of good features from RIS in their rush to push WDS - and don't seem to be listening to their customers when we ask for these features back.

Link to comment
Share on other sites

  • 1 month later...

I use REG LOAD/UNLOAD method

why this reg does not work ?

I modify

[HKCU\Control Panel\International]

"sTimeFormat"="tt hh:mm:ss"

to

"HH:mm:ss"

after Vista Setup has finished

still "tt hh:mm:ss"

I try %windir%\system32\config\systemprofile\ntuser.dat

Remains the same

sorry ! my english is poor

Thanks a lot for your help !!!

Edited by faxio
Link to comment
Share on other sites

  • 2 years later...

Hi!

Any news about modifying NTUSER.DAT with Windows 7?

I set up a VM installation today and wondered if automization would be feasible, much like former approaches in XP:

@echo off
:: 1. Mount Default User
reg load HKLM\DefaultProfile %SystemDrive%\Users\Default\NTUSER.DAT
:: 2. Apply local HKCU.reg (many entries) directly to mounted DefaultProfile
reg import HKCU.reg
:: 3. Unmount Default User, et voilà!
reg unload HKLM\DefaultProfile
exit

For Windows XP it was exactly like this (I just used HKU instead of HKLM) and it worked like a charm!

The tests I did showed that it is possible to manually load the hive (in regedit) and alter single values.

Now I'd like to script these changes!

Any recommendations how to do this?

Greetings,

Mikka

Edit: By the way, merely ordinary keys/values should be written, no restricted ones.

Edited by Mikka
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...