Sign in to follow this  
Followers 0
redfive19

Autologin not working

2 posts in this topic

Guys,

I know I've posted two other times in the past day but I am again stumped (and have been for weeks) about why I cannot get my autologin part of my script working. Originally I thought I had it licked (it's intermittent) when I changed the shutdown code to: Shutdown(3) so that it shuts down and reboots (which I theorized saved the password key instead of just a straight reboot). BTW, the MsGina.dll is written so that I bypass a VPN client that starts it's own GINA. Also, the password is put into the .ini file by an input box. I've tried having it write that value directly to the registry which also did not always work (although it WAS written). At this point I can think it still must be the way I am shutting down cause I've had it not shutdown and check to see if it's writing it to the registry and it is. any ideas guys? All help is greatly appreciated.....

-redfive

$pwd = IniRead("C:\WINDOWS\may2005.ini", "USERINFO", "PASSWORD", "")
SplashTextOn("", "Setting autologin and rebooting, please stand by...", 400, 50, -1, -1, 1, "Tahoma", 10, -1)
RegDelete("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\system", "legalnoticecaption")
RegDelete("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\system", "legalnoticetext")
RegDelete("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon", "LegalNoticeCaption")
RegDelete("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon", "LegalNoticeText")
RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon", "GinaDLL", "REG_SZ", "MSGina.dll")
RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon", "DefaultUserName", "REG_SZ", $userid) 
RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon", "DefaultPassword", "REG_SZ", $pwd) 
RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon", "AutoAdminLogon", "REG_SZ", "1")
RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon", "ForceAutoLogon", "REG_SZ", "1")
Sleep(2000)
SplashOff()
Shutdown(3)

Share this post


Link to post
Share on other sites



and what about the domain name?:

RegWrite("HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\", "DefaultDomainName", "REG_SZ",@ComputerName)

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0