Windows Server 2022设置开机自动登录
当把AMPP部署到操作系统为Server 2022的计算节点的时候会发现之前设置开机自动登录的方法会失效,这时如果仅仅从云服务商提供的web控制终端开启实例则AMPP相关的服务和进程都不能启动,需要设置自动登录来规避这个问题。
参照微软相关文档并实践之后确定以下方法可以实现开机自动登录
To use Registry Editor to turn on automatic logon, follow these steps:
-
Click Start, and then click Run.
-
In the Open box, type Regedit.exe, and then press Enter.
-
Locate the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon subkey in the registry.
-
Double-click the DefaultUserName entry, type your user name, and then click OK.
If the DefaultUserName value does not exist, it must be added. To add the value, follow these steps:
- On the Edit menu, click New, and then point to String Value.
- Type DefaultUserName, and then press Enter.
- Double-click DefaultUserName.
- In the Edit String dialog, type your username and then click OK.
-
Double-click the DefaultPassword entry, type your password, and then click OK.
If the DefaultPassword value does not exist, it must be added. To add the value, follow these steps:
- On the Edit menu, click New, and then point to String Value.
- Type DefaultPassword, and then press Enter.
- Double-click DefaultPassword.
- In the Edit String dialog, type your password and then click OK.
Note:
If no DefaultPassword string is specified, Windows automatically changes the value of the AutoAdminLogon key from 1 (true) to 0 (false), disabling the AutoAdminLogon feature.
- On the Edit menu, click New, and then point to String Value.
- Type AutoAdminLogon, and then press Enter.
- Double-click AutoAdminLogon.
- In the Edit String dialog box, type 1 and then click OK.
- If you have joined the computer to a domain, you should add the DefaultDomainName value, and the data for the value should be set as the fully qualified domain name (FQDN) of the domain, for example contoso.com..
- Exit Registry Editor.
- Click Start, click Shutdown, and then type a reason in the Comment text box.
- Click OK to turn off your computer.
- Restart your computer. You can now log on automatically.