How To Automatically Logon To Windows 7 using a Password

GibboK picture GibboK · Jan 27, 2014 · Viewed 15.9k times · Source

I am working on a Kiosk Application based on Windows 7 Ultimate.

I need:

  • connect to the kiosk using Remote Desktop Connection (so UserName and Passwprd seems required).

  • enable auto login for the kiosk.

Any idea how to achieve these features?

Thanks

Answer

Knuckle-Dragger picture Knuckle-Dragger · Jan 28, 2014

It seems you already have your answers, but I'll add something for future readers. This powershell snip allows for auto-logon via the registry.

Set-ItemProperty -Path 'registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon' -Name DefaultUserName -Value "Administrator"
Set-ItemProperty -Path 'registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon' -Name DefaultPassword -Value "Password"
Set-ItemProperty -Path 'registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon' -Name AutoAdminLogon -Value 1
Set-ItemProperty -Path 'registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon' -Name ForceAutoLogon -Value 1

or can be done the old fashioned way.

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]
"DefaultUserName"="Administrator"
"DefaultPassword"="Password"
"AutoAdminLogon"="1"
"ForceAutoLogon"="1"