Activate the built-in Administrator account during the installation of Windows

User Account Control (UAC) is known to be unsafe. You should instead strictly separate unprivileged user accounts and administrator accounts. Unfortunately, Microsoft makes this quite hard because accounts created during the installation of Windows are always members of the Administrators group.

A better approach is to activate the built-in (but inactive) Administrator account using a autounattend.xml file during the installation of Windows, and later create additional accounts to be members of the Users group.

  1. Place the following autounattend.xml file in the root directory of the USB stick or DVD that you are using to install Windows. Note that this file works with both x32 and x64 versions of Windows.
    <?xml version="1.0" encoding="utf-8"?>
    <unattend xmlns="urn:schemas-microsoft-com:unattend" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
        <settings pass="windowsPE">
            <component name="Microsoft-Windows-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
                <UserData>
                    <ProductKey>
                        <WillShowUI>Always</WillShowUI>
                    </ProductKey>
                </UserData>
            </component>
            <component name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
                <UserData>
                    <ProductKey>
                        <WillShowUI>Always</WillShowUI>
                    </ProductKey>
                </UserData>
            </component>
        </settings>
        <settings pass="oobeSystem">
            <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
                <UserAccounts>
                   <AdministratorPassword>
                      <Value>password</Value>
                      <PlainText>true</PlainText>
                   </AdministratorPassword>
                </UserAccounts>
                <AutoLogon>
                    <Enabled>true</Enabled>
                    <LogonCount>1</LogonCount>
                    <Username>Administrator</Username>
                    <Password>
                        <Value>password</Value>
                        <PlainText>true</PlainText>
                    </Password>
                </AutoLogon>
            </component>
            <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
                <UserAccounts>
                   <AdministratorPassword>
                      <Value>password</Value>
                      <PlainText>true</PlainText>
                   </AdministratorPassword>
                </UserAccounts>
                <AutoLogon>
                    <Enabled>true</Enabled>
                    <LogonCount>1</LogonCount>
                    <Username>Administrator</Username>
                    <Password>
                        <Value>password</Value>
                        <PlainText>true</PlainText>
                    </Password>
                </AutoLogon>
            </component>
        </settings>
    </unattend>
    

    autounattend.xml

  2. Windows will be installed as usual. However, no user accounts will be created, and you will be automatically logged on using the Administrator account once the installation is complete.
  3. Change the password of the Administrator account, and create additional user accounts as desired.