MSFN Forum: Auto Logon doesn't work - MSFN Forum

Jump to content



Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Auto Logon doesn't work only for this user.... Rate Topic: -----

#1 User is offline   dkreifus 

  • dkreifus
  • PipPip
  • Group: Members
  • Posts: 292
  • Joined: 30-March 04

Posted 06 March 2006 - 03:01 PM

I have a script that runs..it sets Auto Logon for a user, restarts, is supposed to log in as that user, copies the default profile, restarts then auto logs in as the admin, deletes that user, and all is done.

I've tried using vb script:

Sub AutoLogin1

	' add registry key for autoadmin logon
	oReg.SetStringValue HKEY_LOCAL_MACHINE, "SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon", "AutoAdminLogon", "1"

	' add registry key for autoadmin logon
	oReg.SetStringValue HKEY_LOCAL_MACHINE, "SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon", "DefaultUserName", "Admin2"

	' add registry key for autoadmin password
	oReg.SetStringValue HKEY_LOCAL_MACHINE, "SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon", "DefaultPassword", "testing"

	' add registry key to execute script after reboot through run once
	oReg.SetStringValue HKEY_LOCAL_MACHINE, "SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce", "Runsysprep", "C:\install\RnSysprp.vbs"

	oIEDoc.WriteLn "<p><center><font color=""blue"">Registry keys for Autologon set</font></center></p>"
	Wscript.Sleep 2500

End Sub


AND

This works
Sub AutoLogin2

	' add registry key for autoadmin logon
	oReg.SetStringValue HKEY_LOCAL_MACHINE, "SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon", "AutoAdminLogon", "1"

	' add registry key for autoadmin logon
	oReg.SetStringValue HKEY_LOCAL_MACHINE, "SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon", "DefaultUserName", "Administrator"

	' add registry key for autoadmin password
	oReg.SetStringValue HKEY_LOCAL_MACHINE, "SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon", "DefaultPassword", "mypassword"

	' add registry key to execute script after reboot through run once
	oReg.SetStringValue HKEY_LOCAL_MACHINE, "SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce", "Runsysprep", "C:\install\RnSysprp.vbs"

	oIEDoc.WriteLn "<p><center><font color=""blue"">Registry keys for Autologon set</font></center></p>"
	Wscript.Sleep 2500	

End Sub


Am I missing something here?


#2 User is offline   Doc Symbiosis 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 333
  • Joined: 03-August 04

Posted 06 March 2006 - 09:42 PM

Looks like the admin2 account doesn't eixst or the password is wrong.
What error message do you receive.

#3 User is offline   dkreifus 

  • dkreifus
  • PipPip
  • Group: Members
  • Posts: 292
  • Joined: 30-March 04

Posted 07 March 2006 - 08:36 AM

After some research, I discovered this message as the culprit:

"Some keys are open by the system or other processes."

I am running this as administrator. Any ideas?

#4 User is offline   exrcizn 

  • Rock Star
  • PipPip
  • Group: Members
  • Posts: 123
  • Joined: 15-October 04

Posted 07 March 2006 - 08:47 AM

Is admin2 an administrator?

#5 User is offline   dkreifus 

  • dkreifus
  • PipPip
  • Group: Members
  • Posts: 292
  • Joined: 30-March 04

Posted 08 March 2006 - 08:32 AM

Well, I was wrong. That error message was not the culprit.

The problem is that the registry file doesn't take for some reason.

If I execute the .reg file and import everything..it doesnt take. But if I go and manually see that the files are there, then it takes?

Any ideas?

It doesnt matter if it is a VB script or .reg file. it doesnt take

View PostDoc Symbiosis, on Mar 6 2006, 10:42 PM, said:

Looks like the admin2 account doesn't eixst or the password is wrong.
What error message do you receive.


it does exist. I create it during cmdlines.txt. I get to the logon screen and it is there. The password is accurate. I don't get a prompt for wrong password. And if I log in, and run the script a second time or I check on it manually, it seems to work.

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy