Jump to content

Alternate way to set HKCU for all future users


Recommended Posts

All,

I counld not find any posts about this option so I thought I would share. I wanted a way to setup HKCU regisrty tweaks for the "Default" user. I know that you can do it using the "cmdlines.txt" file, but I was determined to keep all my files on the CD. Using the "cmdlines.txt" solution moves the files to the HD. I did some digging and came up with this. Using "reg.exe" and "load" you can do the following

Set DEFAULT_USER=%ALLUSERSPROFILE%\..\Default User
reg load HKU\TWEAKS "%DEFAULT_USER%\NTUSER.DAT"
regedit /s tweaks.reg
reg unload HKU\TWEAKS

In your "tweaks.reg" file replace all HKCU with HKU\TWEAKS, for example

[HKEY_CURRENT_USER\Control Panel\Desktop] becomes

[HKEY_USERS\TWEAKS\Control Panel\Desktop]

In this manner you can call this from the CD (I use RunOnceEx from the CD) and keep all your install files on the CD (including the one that updates the default registry tweaks.

Hope this helps someone.

Thank you

Link to comment
Share on other sites


Since you are editing the DAT file, be careful, if you get something wrong .....

It may be wiser to suggest a copy rename in your cmd first, if you want others to go down this road.

Good tip though non-the-less

Link to comment
Share on other sites

If you use cmdlines.txt it will only copy the files that are in the $* directories. So the following directories will get copied:

$OEM$\$$

$OEM$\$1

$OEM$\$Docs

$OEM$\$Progs

but the $OEM$ directory itself won't be copied.

Link to comment
Share on other sites

You could also edit the HIVESDEF.INF file in the I386 folder.

HIVEDEF.INF is not fully reliable to set default settings because the XP setup overwrite many of them.

BTW, I made a batch for that few weeks ago. It change reg settings for all users

(even already existing account).

REGWIDE

Link to comment
Share on other sites

You could also edit the HIVESDEF.INF file in the I386 folder.

HIVEDEF.INF is not fully reliable to set default settings because the XP setup overwrite many of them.

BTW, I made a batch for that few weeks ago. It change reg settings for all users

(even already existing account).

REGWIDE

Are you sure about that? I would consider that very strange, as people are also editing their HIVESFT.INF without any problem...

Link to comment
Share on other sites

mmmm. I remember seing this technique posted here in MSFN about a year ago.  <_<

Edit: Just checked. This technique has been discussed a LOT of times here in MSFN.  Check previous years (2002-2003)

When I search for "HIVESDEF.INF" 365 days ago and older, I find nothing. However, if I change it to any date, this topic shows up. There was some kind of topic of Numinous which had some info concerning this, and there it worked!

Link to comment
Share on other sites

mmmm. I remember seing this technique posted here in MSFN about a year ago.  <_<

Edit: Just checked. This technique has been discussed a LOT of times here in MSFN.  Check previous years (2002-2003)

When I search for "HIVESDEF.INF" 365 days ago and older, I find nothing. However, if I change it to any date, this topic shows up. There was some kind of topic of Numinous which had some info concerning this, and there it worked!

i think he's refering to the loading the DAT file, editing in that manner, then unloading :whistle:

Link to comment
Share on other sites

Pretty much.

I believe the .Default key is what gets mapped to the Default User Profile (the one loaded when no one is logged). Remember that the Default user profile settings only get applied to NEW accounts created after the default profile is modified. Existing profiles won't get any changes.

I remember hearing from un4given1 that the HKEY_CURRENT_USER is really a "shortcut" to the HKEY_USERS\PID of the user who is logged on at that moment.

Link to comment
Share on other sites

When a user logs on, Windows XP checks the list of user profiles in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList to determine if a local profile exists and its %USERPROFILE% path. If an entry exists, the OS loads the hive file Ntuser.dat found in %USERPROFILE% into the subkey HKEY_USERS\<security ID> and then links HKEY_CURRENT_USER to it. If on the other hand the OS does not find a matching user profile, it copies the Ntuser.dat from <ProfilesDir>\Default User into the new <ProfilesDir>\%USERNAME% and loads it into a new subkey HKEY_USERS\<security ID> and then links HKEY_CURRENT_USER to it.

Link to comment
Share on other sites

  • 2 weeks later...

Is anyone aware that the method show here:

http://unattended.msfn.org/xp/hkcu_registry.htm

does not work at all?

I tried it twice tonite, and both times only some of the reg tweaks were applied but only for administrator. Nothing was applied to new user accounts.

Whoever is reponsible for that site needs to change that false info.

EDIT: HKEY_USERS\.DEFAULT\

Making your regtweaks file edit that registry branch works great for all future users.

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