Jump to content

Updates to default user NTUSER.DAT file not sticking


Recommended Posts

EDIT: This is Server 2003 SP2 by the way.

I'm trying to make some default user profile changes via command line "reg"

Example

reg add "HKU\Test\software\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects" /v "VisualFXSetting" /t REG_DWORD /d 3 /f

These changes work and if I load up the Default User NTUSER.DAT file, the changes are there. However, when I log in as a different user for the first time, not all of the changes propigate to the newly logged in user. The above entry is one that doesn't seem to take. I make that change in conjunction with some other settings that go along with it.

These changes are specific to a certian group of servers we have. The other setting I can never seem to get to stick is showing system or "super hidden" files. Again, this reg entry shows up in the NTUSER.DAT file for the default user, but the setings don't seem to propigate to the newly logged in user.

:: *** Show super hidden (i.e. system) files
reg add "HKU\Test\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v ShowSuperHidden /t REG_DWORD /d 1 /f
reg add "HKU\Test\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v SuperHidden /t REG_DWORD /d 1 /f

And here is the full reg section for one specific group of servers.

:: ******************************************************************
:: ***** Configure Default User
:: ******************************************************************

:: *** Load Default User hive
reg load "HKU\Test" "%USERPROFILE%\..\Default User\NTUSER.DAT"

:: *** Set up default theme as Luna
reg add "HKU\Test\software\microsoft\windows\currentversion\ThemeManager" /v ColorName /t REG_SZ /d NormalColor /f
reg add "HKU\Test\software\microsoft\windows\currentversion\ThemeManager" /v DllName /t REG_Expand_SZ /d %SystemRoot%\resources\Themes\luna\luna.msstyles /f
reg add "HKU\Test\software\microsoft\windows\currentversion\ThemeManager" /v LastUserLangID /t REG_SZ /d 1033 /f
reg add "HKU\Test\software\microsoft\windows\currentversion\ThemeManager" /v SizeName /t REG_SZ /d NormalSize /f
reg add "HKU\Test\software\microsoft\windows\currentversion\ThemeManager" /v ThemeActive /t REG_SZ /d 1 /f
reg add "HKU\Test\software\microsoft\windows\currentversion\ThemeManager" /v WCreatedUser /t REG_SZ /d 1 /f


:: *** Set Visual Performance Settings to custom
reg add "HKU\Test\software\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects" /v "VisualFXSetting" /t REG_DWORD /d 3 /f

:: *** Use drop shadows for icon labels on the desktop
reg add "HKU\Test\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v ListviewShadow /t REG_DWORD /d 1 /f

:: *** Adds settings for Smooth scroll list boxes, Slide open combo boxes, Fade or slide menus into view
:: *** Show shadows under mouse pointer, Fade or slide tooltips into view, Fade out menu items after clicking
:: *** and Show shadows under menus
reg add "HKU\Test\Control Panel\Desktop" /v UserPreferencesMask /t REG_BINARY /d be1a0780 /f

:: *** Smooth edges of screen fonts
reg add "HKU\Test\Control Panel\Desktop" /v FontSmoothing /t REG_SZ /d 2 /f
reg add "HKU\Test\Control Panel\Desktop" /v FontSmoothingType /t REG_DWORD /d 2 /f


:: *** Unload Default User hive
reg unload "hku\Test"

Anyone know why this happens or a way around it?

Edited by rchiav
Link to comment
Share on other sites


Do any of the changes propagate?

And shouldn't you be using HKCU instead of HKU?

Yes, some of the changes propigate. And no, you don't use HKCU. I'm mounting the default users NTUSER.DAT as \HKU\test and writing the changes. When they log in for the first time, this should be copied to their profile and used as their HKCU hive.

Link to comment
Share on other sites

Ah Ya. I see what you've done there. Pain in the a** ain't it. I suggest that you use reg files instead of the reg.exe command. There are strange and weird registry permissions in the "Default User" ntuser.dat file. Load the hive, then load a properly formatted reg file using regedit /s - the reg.exe may have problems with the permissions.

Of course the "proper" way to edit the default user profile is to do at T-12 (cmdlines.txt) with a scripted installation.

Link to comment
Share on other sites

I think "VisualFXSetting" should be VisualFXSetting

good catch. Thanks..

and you can find this useful.

Doesn't look like it helped. I'll dig into it some more tomorrow. Thanks for the help though.

(forgot to click submit on this before I left yesterday)

Link to comment
Share on other sites

Ah Ya. I see what you've done there. Pain in the a** ain't it. I suggest that you use reg files instead of the reg.exe command. There are strange and weird registry permissions in the "Default User" ntuser.dat file. Load the hive, then load a properly formatted reg file using regedit /s - the reg.exe may have problems with the permissions.

Of course the "proper" way to edit the default user profile is to do at T-12 (cmdlines.txt) with a scripted installation.

I'm not having a problem updating the default NTUSER.DAT. I can open it again and the changes are there. The new user just doesn't get the changes.

Link to comment
Share on other sites

I use a bunch of changes to the default user profile via reg add by running a cmd from cmdlines.txt but they don't take affect until after a 2nd reboot. They are applied against the Administrator account but if I only logout then log back in immediately they don't show up for new users. Reboot computer and log in with a new user and the changes are there... I am using the HKCU settings - apparently if the reg settings are added at the T-13 time they are applied to the default user ntuser.dat settings but only appear for regular users after the 2nd reboot after installation... Hope this helps.

Link to comment
Share on other sites

You need to load the Default User hive (C:\Documents and Settigns\Default User\NTUSER.DAT) under, say HKLM as DefUsr, and then apply then changes to HKLM\DefUsr, not HKU. Then unload the hive and you should be good to go.

Link to comment
Share on other sites

Actually, if you wanted to go to all the trouble of configuring an existing user profile I would recommend using the GUI to copy the profile to C:\Documents and Settings\Default User. If it's just a few reg hacks then load the hive and make your changes.

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