ENVIRONMENT: Script tested on Windows XP SP2, but the default user profile works the same way on Windows NT Workstation 4.0 and Windows 2000.
PROBLEM: Many Windows settings are located in the HKEY_CURRENT_USER hive in the registry. Since each new user on a Windows machine gets their own copy of the HKCU hive, it's problematical to control and maintain these settings. It's possible to use force-run, distribute-always applications to push these settings, but it would be preferable to have customized settings become defaults for the system.
In order to do this, you have to modify the default user registry hive. Each new user gets a copy of this hive as a starting point for building their own profile. The default profile on Windows XP is under C:\Documents and Settings\Default User.
Each time Windows boots, the Default User profile is loaded into HKEY_USERS\.Default. Changes made here will be active while the system is up, but since the hive is not written back to disk, changes are lost when the system reboots.
SOLUTION: The solution is to make changes within the C:\Documents and Settings\Default User\NTUser.dat registry hive file. Once this is done, all new users on the system will receive your customized settings. This can be done manually for inclusion in a workstation image, or can be scripted and pushed with a ZENworks application.
To manually edit the file, run regedit.exe. Highlight the HKEY_LOCAL_MACHINE hive. On the File menu, choose Load Hive, and browse for C:\Documents and Settings\Default User\NTUser.dat. When prompted for a Key Name, write something like Temphive. Now you have loaded the default user hive into the registry, and can make your desired changes to subkeys and values under HKEY_LOCAL_MACHINE\Temphive. When finished, highlight Temphive with the mouse, and choose Unload Hive from the File Menu. This writes the NTUser.dat file back to disk, including any changes.
Scripting this solution with the built-in Windows XP commands reg.exe and regedit.exe is illustrated below with a customization of redirecting the Internet Explorer search function to Google.
EXAMPLE: First, create a text file named "gogl.reg" containing:
Windows Registry Editor Version 5.00
"Use Search Asst"="no"
Then, create a text file named goglsrch.cmd containing:
copy gogl.reg "C:\Documents and Settings\Default User"
cd "\Documents and Settings\Default User"
if errorlevel 1 goto End
reg load HKLM\Temphive NTUser.dat
if errorlevel 1 goto End
regedit /s gogl.reg
reg unload HKLM\Temphive
Run the script, boot the PC to reload Default User\NTUser.dat into HKEY_USERS\.Default, and log in as a new user. This will not change existing user profiles.
If you have any questions you may contact Phillip at firstname.lastname@example.org
Disclaimer: As with everything else at Cool Solutions, this content is definitely not supported by Novell (so don't even think of calling Support if you try something and it blows up).
It was contributed by a community member and is published "as is." It seems to have worked for at least one person, and might work for you. But please be sure to test, test, test before you do anything drastic with it.