Ask the Expert

How I can modify the Registry Key in Windows XP using Group Policy management?

How I can modify the Registry Key in Windows XP using Group Policy management? I have Windows Server 2003 and 20 XP SP2 users. I created an OU named "Test" and I linked it with a Group Policy, then edited the policy.

I want to change HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsNT\CurrentVersion\winlogon and change the value of DefaultUserName. How I can do it?

Requires Free Membership to View

Because this is not a policy setting in Group Policy management but a regular registry key, you would need to create a custom ADM file which will then allow you to change this key. Be warned, however, that this will only allow you to set this as a "preference" rather than a true policy. We have a lot of information about this phenomenon at Just note the setting can be overwritten by other processes, such as in the case you mention where this key is in fact written over at logon to hold the name of the last user who logged in.

If you are trying, specifically, to get the machine to log on automatically with a particular user account you would be better off using a third-party tool such as TweakUI.

If you are simply trying to hide the name of the last user who logged in you can use the policy setting at:

Computer ConfigurationWindows SettingsLocal PoliciesSecurity Options Interactive logon: Do not display last user name

This was first published in September 2006

There are Comments. Add yours.

TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: