Partager via


AutoLogon

AutoLogon specifies the account to use to log on to the computer automatically. Autologon credentials are deleted from the unattended installation answer file after Windows Setup is complete.

Important

Make sure Autologon is disabled on computers that are delivered to customers.

By default, the built-in administrator account is disabled in all default, clean installations.

For Windows Vista®, you can enable the built-in administrator account during unattended installations, by setting Username to Administrator (only the English word automatically enables the account). This enables the built-in administrator account, even if a password is not specified in AdministratorPassword.

For Windows Server® 2008, the built-in Administrator must have a password, and that password must be changed at first logon. This will prevent the built-in Administrator account from having a blank password by default.

Both Microsoft-Windows-Shell-Setup | Autologon and Microsoft-Windows-Shell-Setup | UserAccounts | AdministratorPassword sections are now needed for autologon in audit mode to work. Both of these settings should be added to the auditSystem pass.

Note

These settings are valid for upgrades.

Child Elements

Domain

Specifies the domain to which the computer is logging on.

Enabled

Specifies whether the autologon process is enabled.

LogonCount

Specifies the number of times the account has been used. LogonCount must be specified if AutoLogon is used.

Password

Specifies the password for the account used for autologon.

Username

Specifies the user account name used for autologon.

Valid Passes

auditSystem

oobeSystem

specialize

Parent Hierarchy

Applies To

For the list of the supported Windows editions and architectures that this component supports, see Microsoft-Windows-Shell-Setup.

XML Example

The following XML output shows how to set autologon.

<AutoLogon>
   <Password>
      <Value>MyPassword</Value>
   </Password>
   <Domain>FabrikamDomain</Domain>
   <Enabled>true</Enabled>
   <LogonCount>2</LogonCount>
   <Username>MyUserName</Username>
</AutoLogon>

See Also

Concepts

Microsoft-Windows-Shell-Setup