Jump to content

HKCU or HKU\.DEFAULT?


Recommended Posts

i'm having a problem getting some settings to "stick"

i apply them once before i do any net user adds.

then i apply them AFTER that. both in t-13.

THEN i apply them during GuiRunOnce even as well; yet some do not seem to stick even after that.

i even repeat them - i apply them to HKCU as well as HKEY_USERS\.DEFAULT just in case... before i even add my first user.

yet some still do not stick.

will just adding it to HKCU during t-13 work? or should i be using HKU\.DEFAULT, or should i be adding to both?

Link to comment
Share on other sites


hmm.

i'm also thinking of editing the default HIVE*.INF files - i don't think i can get much more into the source than that.

i'm still listening to any replies about my first post, as well as any feedback on editing the HIVE files directly...

Link to comment
Share on other sites

they're as correct as i can tell.

i tried comparing them against existing machines, as well as looked up as many as i could on MSDN.

also reverse engineered some by taking snapshots of virgin XP boxes prior manual tweaking, and then comparing the registry to that virgin snapshot and capturing the diffs.

Link to comment
Share on other sites

Are you using SP2? With my setup CD, I've had to apply the registry edits on the SECOND boot as well to make some stick.

ATM I'm applying them at T-13, GuiRunOnceEx and GuiRunOnceEx (second boot).

Note, if you apply the settings at T-13, you don't really need to apply them to .DEFAULT as that is what they are applied to anyway.

There is no need to apply the registry edits before AND after you create the user accounts at T-13... It only gets applied to .DEFAULT.

Link to comment
Share on other sites

see, i was doing it just to be on the safe side.

i.e.:

1) add tweaks.reg FIRST, just in case the "mike" user inherits the settings as-is when the add user command is issued

2) add user "mike"

3) add tweaks.reg AGAIN, just in case i need to make it stick...

however before all this i was not using RunOnceEx - so now i just need to figure out which regedits i can hack into the HIVE*.INF's manually, which i need to apply during t-13, and which can be applied anytime after that (perhaps during RunOnceEx...)

i've got over unique 600 tweaks i've captured from the thread(s) here, MSDN, and my own registry snooping. so it's a daunting task :)

Link to comment
Share on other sites

I have over 400 tweaks that get applied during setup. I only have ONE set of files that get applied at T-13, RunOnceEx and RunOnceEx (second boot).

They take no time to install so it doesn't affect install time much (except for the second reboot).

Edit: I gave up on this "daunting task" and just added a second RunOnceEx... MUCH easier (I was also strapped for time).

Edit2: Here's a simple one-liner I add to "cmdlines.txt", "RunOnceEx.cmd" and "RunOnceEx2nd.cmd":

for %%i in (%systemdrive%\MSA\registry\*.reg) do start /wait regedit /s %%i

That way, it's easy to add registry edits. I know it's kinda redundant (especially for HKLM edits but it takes no time to install them).

Link to comment
Share on other sites

I'm not perfectly sure, but I believe this is the lowdown on HKEY_USERS/.DEFAULT. I believe that in the single-user days, i.e., Windows 95/98/ME, the .DEFAULT key did actually apply to all users. However, as Windows started to become more truly multi-user .DEFAULT was no longer used. Instead, the file you want to edit is the ntuser.dat in the Default User directory (I know that for a fact). However, during the unattended install process when you're applying the registry tweaks (at the T-13 stage), %DefaultUserProfile%\ntuser.dat is mounted at HKEY_CURRENT_USER, and hence all edits there apply to the Default User.

If you want to apply settings to the Default User after first boot, you'll have to do something like:

reg load "HKEY_USERS\Default User" "C:\Documents and Settings\Default User\ntuser.dat"
regedit /s tweaks.reg
reg unload "HKEY_USERS\Default User"

where all the tweaks in tweaks.reg now refer to "HKEY_USERS\Default User" instead of "HKEY_CURRENT_USER". reg.exe isn't available by default in Windows 2000, but it is in Windows XP. It seems now that the .DEFAULT key applies to things as they are when nobody is logged in. For example, if you want to change how the classic logon screen looks you edit stuff in HKEY_USERS\.DEFAULT. I've never had a problem with properties not sticking when importing reg f iles at the T-13 stage, though. Make sure some of those settings don't actually belong in HKEY_LOCAL_MACHINE. If that's not the problem then I'm not sure what is.

Hope that helped.

Link to comment
Share on other sites

yeah, i've been hunting around, i think i do have a few things mixed with HKLM and HKCU (duplication or misplacement)

however, i have taken some settings from virgin XP boxes so the datatypes and keys/locations are 100% correct.

i will be trying those on this trial, and i will only be using HKCU from now on... not HKU\.DEFAULT, from what it sounds like.

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