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-Windows-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