I am using the script below to have all of our student systems auto login to a student account that I have created. Everything runs without fail, but is does not write the DefaultPassword registry key. Any suggestions would be appreciated since we are about to deploy 3000+ plus machines starting in a week and a half



@ echo off

set /p account=Account Name:

set /p password=Account Password

net localgroup administrators DOMAIN\%account% /add

REG ADD "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon" /v AutoAdminLogon /t REG_SZ /d 1 /f

REG ADD "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultDomainName /t REG_SZ /d IPS /f

REG ADD "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultUserName /t REG_SZ /d %account% /f

REG ADD "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultPassword /t REG_SZ /d %password% /f


4 Comments   [ - ] Hide Comments


  • What if you remove the varialbes and hardcode the Account and Password into the REG ADD commands - does it work then?
  • I actually have not tried that. Let me see if it works. Only downside to that is I have multiple accounts and sites.
  • Taking out the /p and hardcoding worked for me. Also, using the /p and adding the user name and password in the prompts worked too.
  • http://www.itninja.com/link/change-password-and-enable-local-administrator-account-kace
Please log in to comment

There are no answers at this time
Answer this question or Comment on this question for clarity