How To Automatically Logon To Windows 7 using a Pa

2019-06-07 18:01发布

问题:

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

回答1:

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"


回答2:

The solution to my problem was

Autologon for Windows http://technet.microsoft.com/en-us/sysinternals/bb963905.aspx

Which enable to automatically login a user using his password

I would also suggest, in order to set Windows configuration for a Kiosk KIOSK Classic http://sourceforge.net/projects/kioskclassic/



回答3:

Copy that to notepad, edit, and save it as a bat file. Run on the destination

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 DefaultUserName  /t REG_SZ /d "User" /f

reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultPassword  /t REG_SZ /d "Password" /f

reg delete "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon" /v AutoLogonCount /f

reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon" /v ForceUnlockLogon  /t REG_DWORD /d 1 /f

reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultDomainName /t REG_SZ /d "domain"
  1. If you do not have a domain just use .\

  2. If you want to set a number for the AutoLogonCount, it's decreased on every reboot. Once reached 0, it will stop autologon and reset all your registry keys.