Set default username at Logon screen

G

Guest

Hi,

I'm running an XP pro environment within an active directory domain. I have
multiple users sharing the same computer but I need to have one
account/username to always displayed as the default username on bootup at the
logon screen.

I don't wish to implement Auto Login but is there a way to hard code the
default username at logon?

Thanks,

Kim L.
 
L

Lanwench [MVP - Exchange]

K. Lague said:
Hi,

I'm running an XP pro environment within an active directory domain.
I have multiple users sharing the same computer but I need to have one
account/username to always displayed as the default username on
bootup at the logon screen.

I don't wish to implement Auto Login but is there a way to hard code
the default username at logon?

I don't know of a group policy object you can use to define this -
personally, I like to enable the policy that disables "display last user
login name", , as I *want* people to remember their login names. But you
might want to post in a GP group for more help....
 
T

Torgeir Bakken \(MVP\)

K. Lague said:
Hi,

I'm running an XP pro environment within an active directory domain.
I have multiple users sharing the same computer but I need to have
one account/username to always displayed as the default username on
bootup at the logon screen.

I don't wish to implement Auto Login but is there a way to hard code
the default username at logon?
Hi

Run the VBScript below from e.g. HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft
\Windows\CurrentVersion\Run with the following command:

wscript.exe "path to .vbs file here"


'--------------------8<----------------------
Set oShell = CreateObject("WScript.Shell")

' adjust to correct user/domain
sUserName = "SomeLogonNameHere"
sDomain = "SomeDomainNameHere"

oShell.RegWrite "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" _
& "\Winlogon\DefaultUserName", sUserName

oShell.RegWrite "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" _
& "\Winlogon\DefaultDomainName", sDomain

'--------------------8<----------------------


WSH 5.6 documentation (local help file) can be downloaded from here
if you haven't got it already:
http://msdn.microsoft.com/downloads/list/webdev.asp
 
G

Guest

Thanks, I'll give it a try.

KL.

Torgeir Bakken (MVP) said:
Hi

Run the VBScript below from e.g. HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft
\Windows\CurrentVersion\Run with the following command:

wscript.exe "path to .vbs file here"


'--------------------8<----------------------
Set oShell = CreateObject("WScript.Shell")

' adjust to correct user/domain
sUserName = "SomeLogonNameHere"
sDomain = "SomeDomainNameHere"

oShell.RegWrite "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" _
& "\Winlogon\DefaultUserName", sUserName

oShell.RegWrite "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" _
& "\Winlogon\DefaultDomainName", sDomain

'--------------------8<----------------------


WSH 5.6 documentation (local help file) can be downloaded from here
if you haven't got it already:
http://msdn.microsoft.com/downloads/list/webdev.asp

--
torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of
the 1328 page Scripting Guide:
http://www.microsoft.com/technet/scriptcenter/default.mspx
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top