Home > Windows Server Tips > Windows Systems and Network Administration > Script makes the right adjustments
Windows Server Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

WINDOWS SYSTEMS AND NETWORK ADMINISTRATION

Script makes the right adjustments


Amy Banford, Contributor
05.23.2005
Rating: -3.67- (out of 5)


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


Please let us know how useful you find this tip by rating it below. Do you have a useful Windows tip, timesaver or workaround to share? Submit it to our tip contest and you could win a prize!


We have all worked with software that requires certain settings to be adjusted while the software's user is logged in to the system. This can be very frustrating when more than one person uses a system.

If you want to avoid revisiting a workstation multiple times, then make sure that whomever logs on to the system has a registry setting in his profile. Using the NT 4 Resource Kit utility REG.EXE, along with Systems Management Server (SMS) Installer, you can accomplish this.

Understanding how user profiles interact with the registry is key to making effective use of this script. One common misconception is that making changes to the [KHEY_USERS\.DEFAULT] key will make the changes to the Default User profile. This is not the case. The [.DEFAULT] key actually governs the state of the computer when no user is logged in. If you want a certain background bitmap to appear behind the Ctrl + Alt + Delete screen, set the Wallpaper value in [HKEY_USERS\.DEFAULT\Control Panel\Desktop]. The keys that are left under [HKEY_USERS] represent the registry hives of the local administrator account, the currently logged in user and any service accounts currently being used to run services.

The registry settings for the Default User profile are actually stored in the NTUSER.DAT file in the Default User profile folder. To create a custom Default User profile, log in to a system and customize your profile settings. Then use the System Properties applet to copy the profile to the Default User directory. This effectively copies the NTUSER.DAT file from your profile to the Default User directory.

When a user logs on to a system, that person's regi...


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED CONTENT
Windows Systems and Network Administration
Troubleshooting Windows application crashes or hangs
Converting VMware ESX machines to Hyper-V format
Using DFSR for SYSVOL replication in Windows Server 2008
Top 25 Windows PowerShell commands for administrators
Key DFS improvements in Windows Server 2008 R2
Free Windows security tools every admin must have
Group Policy makes strides in Windows Server 2008 R2
Quick tips for troubleshooting NTFS permissions
Common causes of Windows server security vulnerabilities
Cutting the cost of Windows identity and access management

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary


stry hive is loaded from the NTUSER.DAT file located in the user's profile directory to a key represented by the user's SID under [HKEY_USERS]. If the person has never logged on to the system before, a copy of NTUSER.DAT from the Default User profile is loaded for that user. When the user logs off of the system, the [HKEY_USERS\SID] registry key disappears, and all of the user-specific registry settings are stored in the NTUSER.DAT file in that user's profile directory.

In order to modify a user-specific registry setting for an existing profile or the Default User, you can use REG.EXE from the NT 4 Resource Kit. REG.EXE lets you load a stored registry hive, make changes to it, then save it back to a flat file. While the documented syntax does allow you to update or add values, I found it very problematic. Instead I use REG.EXE's Open, Save and Close syntax along with SMS Installer's Edit Registry functions to make the changes.

The SMS Installer script below creates a text file with a list of the paths to each existing profile by searching for and renaming each ntuser.ini file on the system. This file exists in every profile folder except Default User. The Default User profile location is pulled from the registry and placed into the text file also.

C:\Documents and Settings\amybanford
C:\Documents and Settings\Administrator
C:\Documents and Settings\SMSCliSvcAcct&
C:\Documents and Settings\SMSCliToknAcct&
C:\Documents and Settings\Default User

The script then reads each line of the text file and loads and changes each profile's registry hive. This script should be executed by SMS when no user is logged on to a system. An NTUSER.DAT file that is in use cannot be loaded. Therefore, the script does not try to load the hive if the profile path contains "SMS" because the SMSCliSvcAcct& account is used to execute advertised programs with SMS.

Click here for the script: 2152AllUserReg.ipf.


Amy Banford is the SMS Administrator for Total System Services Inc. (TSYS) in Columbus, Ga. At TSYS she maintains a large SMS 2.0 site hierarchy. She also handles all software distribution, package creation and custom SMS Web reports. She can be reached at abanford@tsys.com.

This article first appeared in myITforum.com, the online destination for IT professionals who manage their corporations' Microsoft Windows systems and is also part of the TechTarget network of industry specific IT web sites. The centerpiece of myITforum.com is a collection of member forums where IT professionals exchange technical tips, share their expertise and download utilities that help them better manage their Windows environments, specifically Microsoft Systems Management Server (SMS).

Rate this Tip
To rate tips, you must be a member of SearchWindowsServer.com.
Register now to start rating these tips. Log in if you are already a member.




DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



Server Room Design - Planning, Cooling, Maintenance
HomeTopicsBlogsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersIT Downloads
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2004 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts