• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 491
  • Last Modified:

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
0
Bianchi928
Asked:
Bianchi928
1 Solution
 
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
 
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Tackle projects and never again get stuck behind a technical roadblock.
Join Now