User auto login

From the administrator's desktop I'm running the following script and then reboot the computer. I don't know why it's not autologin the user ..it comes with the right username and domain but keep asking me for the password...Any idea ? the username and password are teh same.

const forreading = 1
Dim objfso, objfile, mystring
set objFSo = createobject("scripting.filesystemobject")
set objfile = objfso.opentextfile("c:\temp\data.txt", forreading, false, -1)

do until objfile.atendofstream
   mystring = objfile.readline
loop

myarray = split(mystring,":",-1,1)

Set oNetwork = CreateObject("WScript.Network")
Set oShell = Wscript.CreateObject("Wscript.Shell")
 
UserName   = myarray(4)
Password   = myarray(4)
DomainName = myarray(6)

sRegPath = "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\"
oShell.RegWrite sRegPath & "AutoAdminLogon", 1, "REG_SZ"
oShell.RegWrite sRegPath & "DefaultUserName", UserName, "REG_SZ"
oShell.RegWrite sRegPath & "DefaultPassword", Password, "REG_SZ"
oShell.RegWrite sRegPath & "DefaultDomainName", DomainName, "REG_SZ"

objfile.close
Bianchi928Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Ady FootSharePoint ConsultantCommented:
See if this helps you - seems to be a bit more detailed than your script.
http://www.tek-tips.com/faqs.cfm?fid=6520
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
MuffyBunnyCommented:
You're certain that the values you're grabbing from your arrays are the right ones?
0
Bianchi928Author Commented:
The values are okay..
0
Daz_1234Commented:
Hi Bianchi928,

If you are on a domain, have you disabled the Ctrl-Alt-Delete requirement?

Regards,
Daz.
0
Bianchi928Author Commented:
Cool
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
VB Script

From novice to tech pro — start learning today.