LocalAccountsLocalAccounts

LocalAccounts 指定要在安装过程中创建的本地帐户。LocalAccounts specifies local accounts to be created during installation.

你可以结合使用 sysprep/通用化 命令 LocalAccounts 来更改帐户信息。You can use the sysprep/generalize command in conjunction with LocalAccounts to change account information. 有关详细信息,请参阅 创作答案文件 主题中的最佳实践。See the Best Practices for Authoring Answer Files topic for details.

子元素Child Elements

设置Setting 说明Description
LocalAccountLocalAccount 指定要在安装过程中创建的本地帐户。Specifies a local account to be created during installation.

有效的配置阶段Valid Configuration Passes

auditSystemauditSystem

oobeSystemoobeSystem

父层次结构Parent Hierarchy

Microsoft-Shell-安装程序 | UserAccounts | LocalAccountsMicrosoft-Windows-Shell-Setup| UserAccounts | LocalAccounts

应用于Applies To

有关此组件支持的 Windows 版本和体系结构的列表,请参阅 Microsoft-Windows Shell 设置For a list of the Windows editions and architectures that this component supports, see Microsoft-Windows-Shell-Setup.

XML 示例XML Example

以下 XML 输出显示了如何设置用户帐户。The following XML output shows how to set user accounts.

<UserAccounts>
   <LocalAccounts>
      <LocalAccount wcm:action="add">
         <Password>
            <Value>cAB3AFAAYQBzAHMAdwBvAHIAZAA</Value>
            <PlainText>false</PlainText>
         </Password>
         <Description>Test account</Description>
         <DisplayName>Admin/Power User Account</DisplayName>
         <Group>Administrators;Power Users</Group>
         <Name>Test1</Name>
      </LocalAccount>
      <LocalAccount wcm:action="add">
         <Password>
            <Value>cABhAHMAcwB3AG8AcgBkAFAAYQBzAHMAdwBvAHIAZAA=</Value>
            <PlainText>false</PlainText>
         </Password>
         <Description>For testing</Description>
         <DisplayName>Admin Account</DisplayName>
         <Group>Administrators</Group>
         <Name>Test2</Name>
      </LocalAccount>
   </LocalAccounts>
</UserAccounts>

UserAccountsUserAccounts