Jump to content

Alternate way to set HKCU for all future users


Recommended Posts


Set DEFAULT_USER=%ALLUSERSPROFILE%\..\Default User

reg load HKU\TWEAKS "%DEFAULT_USER%\NTUSER.DAT"

regedit /s tweaks.reg

reg unload HKU\TWEAKS

This method from the first post does not work at all. I just tried it twice. I followed the instructions to the letter, even naming my files the same way. Not a single reg tweak was applied to ANY account, not even admin.

Link to comment
Share on other sites

That's simply because the first line is *wrong*.

It says:

Set DEFAULT_USER=%ALLUSERSPROFILE%\..\Default User

When it should say:

Set DEFAULT_USER="%SYSTEMDRIVE%\Documents and Settings\Default User"

ALLUSERSPROFILE points to C:\Documents and Settings\All Users.

Note: It will affect all acounts if applied before the first time the GUI loads. (Install)

If applied afterwards, it will only affect new accounts.

Link to comment
Share on other sites

Still does not work. I call Tweaks.cmd (placed in $OEM$) in cmdlines.txt before RunOnceEx.cmd runs. Here's the contents of Tweaks.cmd

cmdow @ /HID
@Echo Off

Set DEFAULT_USER="%systemdrive%\documents and settings\Default User"
reg load HKU\TWEAKS "%DEFAULT_USER%\NTUSER.DAT"
regedit /s regtweaks.reg
reg unload HKU\TWEAKS

exit

RegTweaks.reg is also in $OEM$ and I have replaced all HKCU entries with HKU\TWEAKS.

Absolutely NO user accounts are affected. I have tried every example I can find on this forum and nothing works.

My regtweaks.reg file is attached

RegTweaks.reg

Link to comment
Share on other sites

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]

Note: it tells to replace all HKCU (HKEY_CURRENT_USER) with HKU\TWEAKS (HKEY_USERS\TWEAKS). You have HKU all over your reg file, HKU tells REG.EXE to load to HKEY_USERS. It's sort of shorthand to avoid typing the full name

So, for example you have this in your regtweaks.reg file:

  ;----- Remove Favorites from Start Menu

[HKU\TWEAKS\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer]

"NoFavoritesMenu"=dword:00000001

It should be:

  ;----- Remove Favorites from Start Menu

[HKEY_USERS\TWEAKS\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer]

"NoFavoritesMenu"=dword:00000001

Link to comment
Share on other sites

Ok I tried applying Tweaks.cmd on my test comp manually in a dos window and found the problem.

reg load HKU\TWEAKS "%DEFAULT_USER%\NTUSER.DAT"

<--this line will not work as long as those quotation marks are there. Remove them and it works.

Shogun, thanks I'll try that.

Link to comment
Share on other sites

I manually applied my regtweaks to the registry key HKEY_USERS\TWEAKS at the cmd prompt, then created a new acct, logged off, then logged onto the new acct. Some of the settings apply to the new acct but most don't. It doesn't seem to work at all doing it from cmdlines.txt at T-12. Even tried rebooting before logging onto the new acct. Still the same.

Link to comment
Share on other sites

Here is the method I have been using for years if it helps anyone ;)

REG LOAD "HKU\CUSTOM" "C:\Documents and Settings\Default User\NTUSER.DAT"
regedit /s DefaultUser.reg
REG UNLOAD "HKU\CUSTOM"

REG LOAD "HKU\CUSTOM" "C:\Documents and Settings\All Users\NTUSER.DAT"
regedit /s AllUsers.reg
REG UNLOAD "HKU\CUSTOM"

Or you can automate it in your runonceex.cmd script:

REG ADD %KEY%\081 /VE /D "Configuring the Default/All User Settings" /f
REG ADD %KEY%\081 /V 1 /D "REG LOAD \"HKU\CUSTOM\" \"C:\Documents and Settings\Default User\NTUSER.DAT\"" /f
REG ADD %KEY%\081 /V 2 /D "REGEDIT /S %systemdrive%\install\DefaultUser.reg" /f
REG ADD %KEY%\081 /V 3 /D "REG UNLOAD \"HKU\CUSTOM\"" /f

You could also substitue the "C:\Documents and Settings\Default User" %allusersprofile% if you want to use say drive d: for the user profiles...

There are many ways of doing it...

Hope you find this helpful :yes:

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