#cs ----------------------------------------------------------------------------
AutoIt Version: 3.3.0.0
Author: johnhc (6-28-2009)
Script Function:
Encrypt/Hide the AutoLogon Password.
#ce ----------------------------------------------------------------------------
; Read the AutoLogon Parameters and test them for null or missing, quit if so.
$PassWord = RegRead("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon", "DefaultPassword")
If $PassWord = "" Then Exit
$DomainName = RegRead("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon", "DefaultDomainName")
If $DomainName = "" Then Exit
$UserName = RegRead("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon", "DefaultUserName")
If $UserName = "" Then Exit
RegDelete ("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon", "DefaultPassword")
$AutoLogonParms = $UserName&" "&$DomainName&" "&$PassWord
Run (@ScriptDir&"\Autologon.exe "&$AutoLogonParms)
WinWaitActive ("A License Agreement","",2)
Send ("!A")
WinWaitActive ("Auto")
ControlClick ("Auto","","[CLASS:Button; INSTANCE:1]")
This is offered with no guarantees. Remember it does read and delete values from the Registry. If you don't like the code, change it to your liking or create you own method, or simply run AutoLogon.exe and accept that it is not unattended and leaves your plain text PW. This source needs to be compiled for your system. I place the compiled AutoIt script and the AutoLogon.exe into the same folder and call the AutoIt script from the nLite RunOnce exit.Some other information I gathered in my searching and testing:
- If there is there is a plain text PW and a hidden one, the plain text one takes precedence.
- The AutoLogon PW needs to be the same as the account PW or AutoLogon will fail and ask for the PW.
- If the account PW is changed, AutoLogon will fail unless its PW is also changed explicitly.
- The AutoLogon keys are set in nLite.inf (NLITE.IN_).
- nLite.inf also uses nhelper to setup user accounts with the net (really net1) command.
- Both of the last two items expose the account PW in plain text.
- This may well not work on W2000.
- The bottom line, at this time, is there is no way to enable AutoLogon and prevent a PW finder from exposing the PW. See replies from -X- and me, below.
This post has been edited by johnhc: 30 June 2009 - 02:12 PM



Help

Back to top










