We help IT Professionals succeed at work.
Get Started

Enabling Local Admin Logon with WDS Unattended Script

2,593 Views
Last Modified: 2012-06-21
At the end of last year I created a Windows 7 Image (x64) to replace the Windows Vista (x86) images of PC's on the network.
All is going well to an extent however I could never get the local administrator account to auto enable (with password protection).

A side issue - although not as bothersome) is that in Vista it would auto-create an account on the domain. Win 7 won't & I can't see why.

Below is the code to the autounattend script which is set to run in RDS.

Any comments/ideas would be appreciated.
<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
    <settings pass="windowsPE">
        <component name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
            <DiskConfiguration>
                <WillShowUI>Always</WillShowUI>
            </DiskConfiguration>
            <UserData>
                <ProductKey>
                    <WillShowUI>OnError</WillShowUI>
                    <Key></Key>
                </ProductKey>
                <AcceptEula>true</AcceptEula>
                <FullName>Business Name</FullName>
                <Organization>Business Name</Organization>
            </UserData>
        </component>
        <component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
            <SetupUILanguage>
                <UILanguage>en-NZ</UILanguage>
            </SetupUILanguage>
            <InputLocale>en-NZ</InputLocale>
        </component>
    </settings>
    <settings pass="specialize">
        <component name="Microsoft-Windows-International-Core" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
            <InputLocale>en-NZ</InputLocale>
            <SystemLocale>en-NZ</SystemLocale>
            <UILanguage>en-NZ</UILanguage>
            <UserLocale>en-NZ</UserLocale>
        </component>
        <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
            <ShowWindowsLive>false</ShowWindowsLive>
            <TimeZone>New Zealand Standard Time</TimeZone>
        </component>
        <component name="Microsoft-Windows-IE-InternetExplorer" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
            <Home_Page>http://intranet</Home_Page>
            <DisableFirstRunWizard>true</DisableFirstRunWizard>
        </component>
    </settings>
    <settings pass="oobeSystem">
        <component name="Microsoft-Windows-International-Core" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
            <InputLocale>en-NZ</InputLocale>
            <SystemLocale>en-NZ</SystemLocale>
            <UILanguage>en-NZ</UILanguage>
            <UserLocale>en-NZ</UserLocale>
        </component>
        <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
            <OOBE>
                <HideEULAPage>true</HideEULAPage>
                <NetworkLocation>Work</NetworkLocation>
                <ProtectYourPC>3</ProtectYourPC>
            </OOBE>
            <UserAccounts>
                <AdministratorPassword>
                    <Value>passwordhere</Value>
                    <PlainText>true</PlainText>
                </AdministratorPassword>
            </UserAccounts>
            <RegisteredOrganization>Business Name</RegisteredOrganization>
            <RegisteredOwner>Business Name</RegisteredOwner>
            <TimeZone>New Zealand Standard Time</TimeZone>
            <AutoLogon>
                <Password>
                    <Value>passwordhere</Value>
                    <PlainText>true</PlainText>
                </Password>
                <LogonCount>2</LogonCount>
                <Username>Administrator</Username>
                <Enabled>true</Enabled>
            </AutoLogon>
            <WindowsFeatures>
                <ShowWindowsMail>false</ShowWindowsMail>
                <ShowMediaCenter>false</ShowMediaCenter>
                <ShowInternetExplorer>true</ShowInternetExplorer>
                <ShowWindowsMediaPlayer>true</ShowWindowsMediaPlayer>
            </WindowsFeatures>
            <FirstLogonCommands>
                <SynchronousCommand wcm:action="add">
                    <CommandLine>net user administrator /active:yes</CommandLine>
                    <Description>Eanble Local Admin Account</Description>
                    <Order>1</Order>
                    <RequiresUserInput>false</RequiresUserInput>
                </SynchronousCommand>
            </FirstLogonCommands>
        </component>
        <component name="Microsoft-Windows-Deployment" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
            <Reseal>
                <Mode>OOBE</Mode>
            </Reseal>
        </component>
    </settings>
    <cpi:offlineImage cpi:source="wim://server/share/dc7900/win7/dc7900win7prox64_v2.wim#Windows 7 Pro x64 v2.0" xmlns:cpi="urn:schemas-microsoft-com:cpi" />
</unattend>

Open in new window

Comment
Watch Question
This problem has been solved!
Unlock 1 Answer and 4 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE