安全还是便利?似乎我们不能两者兼得,所以我们必须决定什么对我们最重要。如果方便胜出并且Windows 得到了合理的保护(Windows is reasonably secured),那么能够自动登录到Windows会很有帮助。它也比在没有密码的情况下使用 Windows(using Windows without a password)更安全。我们可以为加入域(computers joined to a domain)或独立单元 的Windows 10 计算机配置自动登录。

使用 SysInternals Autologon 为 Windows 10 启用自动登录(Enable Auto-Login for Windows 10 Using SysInternals Autologon)
使用SysInternals Autologon是在(SysInternals Autologon)Windows 10中启用自动登录的最简单、最简单的方法。SysInternals Autologon是Microsoft提供的一个小型应用程序。有一套SysInternals工具可以帮助解决许多问题,包括对 Windows 进行故障排除(troubleshooting Windows)。转到https://docs.microsoft.com/en-us/sysinternals/downloads/autologon,下载并解压缩文件夹。
- 为计算机选择正确的自动登录(Autologon)版本。Plain Autologon适用于 32 位 Windows,而Autologon64适用于 64 位 Windows。

- 将打开一个用户访问控制(User Access Control)( UAC ) 窗口,询问运行该应用程序的权限。选择是(Yes)。

- 自动登录许可协议(Autologon License Agreement)窗口打开。阅读并选择同意(Agree )继续。

- Autologon已经填写了Username和Domain。输入用户的密码(Password)并选择启用(Enable)。

要稍后禁用自动登录,只需打开Autologon并选择Disable。

通过设置为 Windows 10 Workgroup PC 启用自动登录(Enable Auto-Login for Windows 10 Workgroup PC Through Settings)
也许出于某种原因我们不想使用应用程序来启用自动登录。没关系,这也可以手动完成。
- 按Windows 键(Windows Key)+ R打开“运行”(Run)面板。
- 键入 <pre>netplwiz</pre> 并按Enter。用户帐户(User Accounts)窗口将打开。

- 取消选中“用户必须输入用户名和密码才能使用此计算机(Users must enter a user name and password to use this computer)”框。选择确定(OK)。

- 自动登录(Automatically sign in )窗口将打开,并预先填写用户名。输入密码(Password )并确认密码(Confirm Password)。

返回“用户(User) 帐户(Accounts)”窗口后,选择“高级(Advanced )”选项卡。查找Require users to press Ctrl + Alt + Delete to login 并确保未选中。选择确定(OK ),下次登录时,Windows不会要求输入密码。

如何启用需要用户复选框(How to Enable Require Users Checkbox)
如果复选框不存在怎么办?这在Windows 10(Windows 10)中很常见。有几种方法可以恢复复选框,但只有一种方法可以保证有效。它需要编辑Windows 注册表(Windows Registry)。在进行任何更改之前,请务必备份注册表。(Always)
- 按Windows Key + R打开“运行”(Run)面板。
- 键入regedit并按Enter。

用户帐户控制(User Account Control)( UAC ) 窗口打开,询问您是否要允许此应用对您的设备进行更改?(Do you want to allow this app to make changes to your device?)选择是(Yes)。

- 当注册表编辑器(Registry Editor)窗口打开时,导航到HKEY_LOCAL_MACHINE > SOFTWARE > Microsoft > Windows NT > CurrentVersion > PasswordLess > Device。

- 双击DevicePasswordLessBuildVersion键并将值数据(Value data)从2更改为0。选择确定(OK)。

关闭注册表编辑器(Registry Editor)并重新启动计算机。
如果注册表项不存在,则可以创建它。以管理员(Administrator)身份打开CMD提示符或PowerShell。
输入命令reg ADD “HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\PasswordLess\Device” /v DevicePasswordLessBuildVersion /t REG_DWORD /d 0 /f并按Enter。

当出现响应The operation completed successfully时,重新启动计算机。

- 计算机重新启动后,请执行上面与使用 netplwiz 命令相关的步骤。用户必须输入用户名和密码才能使用此计算机(Users must enter a user name and password to use this computer)复选框现在在那里。
为域中的 Windows 10 PC 启用自动登录(Enable Auto-Login for Windows 10 PC in a Domain)
不建议日常使用。在没有适当安全预防措施的情况下启用自动登录可能会危及域。不过,它可能对显示系统有用,例如在快餐店或机场。
在断电的情况下,设备将在重新启动时自动重新登录。理想的情况是在设备上安装不间断电源 ( UPS )。
我们将进行的更改可以作为组策略对象(Group Policy Object)( GPO ) 来完成,可以根据需要在域中应用。
- 在域控制器上,打开Group Policy Management并导航到Domains > YourDomain > Group Policy Objects。在那里,右键单击组策略对象(Group Policy Objects)并选择新建(New)。

- 为新GPO输入描述性名称,例如Auto Login并选择OK。

- 右键单击自动登录(Auto Login )GPO 并选择编辑...(Edit…)

- 组策略管理编辑器(Group Policy Management Editor )打开。导航到计算机配置(Computer Configuration )>首选项(Preferences )> Windows 设置(Windows Settings )>注册表(Registry)。

- 右键单击注册表(Registry )并选择新建(New )>注册表项(Registry Item)。我们将在这部分过程中创建 5 个注册表项。我们将通过第一个。使用下面提供的属性对其他 4 个注册表项相应地重复这些步骤。

- 在New Registry Properties中,将Action保留为Update,将Hive保留为HKEY_LOCAL_MACHINE ( HKLM )。选择Key Path(Key Path )字段旁边的省略号或三点 (...) 。注册表项浏览器(Registry Item Browser )窗口打开。

导航到HKLM > SOFTWARE > Microsoft > Windows NT > CurrentVersion > Winlogon,然后选择Select以将其设置为密钥的路径。

- 返回New Registry Properties窗口,在Value Name字段中输入AutoAdminLogon 。将值类型(Value type )保留为默认值REG_SZ并在值数据(Value data )字段中输入1 。1 表示启用AutoAdminLogon。如果我们想禁用它,我们会将其更改为零 (0)。选择确定以在(OK )GPO中设置注册表设置。

(Repeat)使用以下值重复步骤 5 到 7:
设置自动登录使用的域名(To set the domain name to be used by autologon):
关键路径(Path):HKLMSOFTWAREMicrosoftWindows NT\CurrentVersion\Winlogon
值类型:REG_SZ
值名称:默认域名
值(Value)数据:YourDomainName——在这个例子中,它是CORP

设置自动登录使用的默认用户名:(To set the default username used by autologon:)
关键路径(Path):HKLMSOFTWAREMicrosoftWindows NT\CurrentVersion\Winlogon
值类型:REG_SZ
值名称:默认用户名
值(Value)数据:YourUsername——在本例中,它是AutoLogonSvc

设置自动登录使用的默认密码:(To set the default password used by autologon:)
关键路径(Path):HKLMSOFTWAREMicrosoftWindows NT\CurrentVersion\Winlogon
值类型:REG_SZ
值名称:默认密码
数值(Value)数据:上一个key中设置的用户密码

要防止用户名在重新启动时显示:(To prevent the username from being shown on reboot:)
关键路径(Path):HKLMSOFTWAREMicrosoftWindows NT\CurrentVersion\Winlogon
值类型:REG_SZ
值名称:DontDisplayLastUserName
数值数据:1

- 一旦创建了密钥并按照下面显示的顺序,通过将GPO拖放到所需的组上, 在“组策略管理”窗口中应用 GPO。(Group Policy Management)

下次重新启动设备时,它们将获取GPO并将其应用到其注册表中。
请注意(Notice),密码以纯文本形式存储。在域中使用自动登录时要非常谨慎。如果任何人都可以打开注册表编辑器(Registry Editor),他们就可以读取密码和用户名。他们现在可以使用这些凭据访问任何可访问的内容。可以采取两种预防措施;阻止任何人访问注册表编辑器并使用具有有限权限的服务帐户进行自动登录。
你会使用自动登录吗?(Will You Use Auto-Login?)
既然您知道如何配置自动登录,那么您打算在什么上使用它呢?您是否已经使用自动登录?如果是这样,在什么情况下,您是否遇到过我们应该注意的任何事情?我们很乐意在下面的评论中听到它。
How to Configure Auto-Login for Windows 10 Domain or Workgroup PC
Security or convenience? It seems lіke we can’t have both, so we must decide what’s most important to us. If conνenience wins out and Windows is reasonably secured, then being able to auto-login to Windows can be helpful. It’s also more secure than using Windows without a password. We can configure auto-login for Windows 10 computers joined to a domain or stand-alone units.

Enable Auto-Login for Windows 10 Using SysInternals Autologon
Using SysInternals Autologon is the simplest, easiest way to enable auto-login in Windows 10. SysInternals Autologon is a small application provided by Microsoft. There’s a suite of SysInternals tools to help with many things, including troubleshooting Windows. Go to https://docs.microsoft.com/en-us/sysinternals/downloads/autologon, download it, and unzip the folder.
- Select the correct Autologon version for the computer. Plain Autologon is for 32-bit Windows and Autologon64 is for 64-bit windows.

- A User Access Control (UAC) window will open asking for permission to run the app. Select Yes.

- The Autologon License Agreement window opens. Read and select Agree to continue.

- Autologon will already be filled in with the Username and Domain. Enter the Password for the user and select Enable.

To disable auto-login later, just open Autologon and select Disable.

Enable Auto-Login for Windows 10 Workgroup PC Through Settings
Maybe we don’t want to use an app to enable auto-login for some reason. That’s okay, this can be done manually, too.
- Press Windows Key + R to open the Run panel.
- Type <pre>netplwiz</pre> and press Enter. The User Accounts window will open.

- Uncheck the box that reads Users must enter a user name and password to use this computer. Select OK.

- The Automatically sign in window will open, pre-filled with the user name. Enter the Password and Confirm Password.

Once we’re back in the User Accounts window, select the Advanced tab. Find Require users to press Ctrl + Alt + Delete to login and make sure it’s unchecked. Select OK and on the next login, Windows won’t ask for a password.

How to Enable Require Users Checkbox
What if the checkbox isn’t there? That’s common in Windows 10. There are a few ways to get the checkbox back, but only one way guaranteed to work. It requires editing Windows Registry. Always make a backup of the registry before making any changes.
- Press Windows Key + R to open the Run panel.
- Type regedit and press Enter.

A User Account Control (UAC) window opens asking, Do you want to allow this app to make changes to your device? Select Yes.

- When the Registry Editor window opens, navigate to HKEY_LOCAL_MACHINE > SOFTWARE > Microsoft > Windows NT > CurrentVersion > PasswordLess > Device.

- Double-click on the DevicePasswordLessBuildVersion key and change the Value data from 2 to 0. Select OK.

Close the Registry Editor and restart the computer.
If the registry key doesn’t exist, it can be created. Open the CMD prompt or PowerShell as Administrator.
Enter the command reg ADD “HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\PasswordLess\Device” /v DevicePasswordLessBuildVersion /t REG_DWORD /d 0 /f and press Enter.

When the response The operation completed successfully appears, restart the computer.

- Once the computer has restarted, go through the steps related to using the netplwiz command above. The Users must enter a user name and password to use this computer checkbox is now there.
Enable Auto-Login for Windows 10 PC in a Domain
This isn’t recommended for everyday use. Enabling auto-login without the proper security precautions can compromise the domain. It might be useful for a display system though, like in fast-food restaurants or airports.
In case of a power outage, the devices would automatically log back in when restarted. The ideal situation is to have an uninterruptible power supply (UPS) on the devices.
The changes we’ll make can be done as a Group Policy Object (GPO) that can be applied as needed within the domain.
- On the domain controller, open Group Policy Management and navigate to Domains > YourDomain > Group Policy Objects. Once there, right-click on Group Policy Objects and select New.

- Enter a descriptive name, like Auto Login, for the new GPO and select OK.

- Right-click on the Auto Login GPO and select Edit…

- The Group Policy Management Editor opens. Navigate to Computer Configuration > Preferences > Windows Settings > Registry.

- Right-click on Registry and select New > Registry Item. We’ll create 5 registry keys with this part of the process. We’ll go through the first one. Repeat the steps accordingly for the other 4 registry keys with the properties provided below.

- In New Registry Properties, leave Action as Update and Hive as HKEY_LOCAL_MACHINE (HKLM). Select the ellipses or three-dots (…) next to the Key Path field. The Registry Item Browser window opens.

Navigate to HKLM > SOFTWARE > Microsoft > Windows NT > CurrentVersion > Winlogon then choose Select to set that as the path for the key.

- Back in the New Registry Properties window, enter AutoAdminLogon in the Value Name field. Leave Value type defaulted to REG_SZ and enter 1 in the Value data field. The 1 means enable AutoAdminLogon. If we wanted to disable it, we’d change that to zero (0). Select OK to set the registry setting in the GPO.

Repeat steps 5 to 7 using the following values:
To set the domain name to be used by autologon:
Key Path: HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon
Value type: REG_SZ
Value Name: DefaultDomainName
Value data: YourDomainName – in this example, it’s CORP

To set the default username used by autologon:
Key Path: HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon
Value type: REG_SZ
Value Name: DefaultUserName
Value data: YourUsername – in this example, it’s AutoLogonSvc

To set the default password used by autologon:
Key Path: HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon
Value type: REG_SZ
Value Name: DefaultPassword
Value data: The password of the user set in the previous key

To prevent the username from being shown on reboot:
Key Path: HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon
Value type: REG_SZ
Value Name: DontDisplayLastUserName
Value data: 1

- Once the keys are created and in the order shown below, apply the GPO in the Group Policy Management window by dragging and dropping it on the desired groups.

The next time the devices are restarted, they’ll pick up the GPO and apply it within their registry.
Notice that the password was stored in plain text. Be tremendously cautious about using autologon in a domain. If anyone can open the Registry Editor, they can read the password and username. They will now have access to anything accessible with those credentials. Two precautions can be taken; prevent anyone from accessing the registry editor and use a service account with limited permissions for the autologon.
Will You Use Auto-Login?
Now that you know how to configure auto-login, what are you going to use it on? Do you already use auto-login? If so, in what scenario and have you come across anything we should be aware of? We’d love to hear about it in the comments below.