4 Replies Latest reply on Oct 26, 2016 1:09 PM by jParnell

    Unattend.xml Public Variables

    sy0385 Rookie

      Hello all,

       

      When deploying an image with the Unattend.xml file,  Windows boots up to the user account I specified in the Unattend.xml file. However, the user account does not take the password that I have placed in the Public Variables and says the password is incorrect. Have any of you ran into this issue?

       

      The following is the unattend.XML file I am using:

       

      <?xml version="1.0" encoding="utf-8"?>

      <unattend>

        <settings pass="auditSystem">

          <component name="Microsoft-Windows-PnpCustomizationsNonWinPE" 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">

            <DriverPaths>

              <PathAndCredentials wcm:keyValue="1" wcm:action="add">

                <Path>c:\windows\LDDriverStore</Path>

              </PathAndCredentials>

            </DriverPaths>

          </component>

          <component name="Microsoft-Windows-Shell-Setup" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" processorArchitecture="amd64">

           <UserAccounts>

              <AdministratorPassword>

                <PlainText>true</PlainText>

                <Value>%AdminPass%</Value>

              </AdministratorPassword>

            </UserAccounts>

            <AutoLogon>

              <Enabled>true</Enabled>

              <Username>useraccount</Username>

              <LogonCount>5</LogonCount>

            </AutoLogon>

         </component>

        </settings>

        <settings pass="auditUser">

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

            <RunSynchronous>

              <RunSynchronousCommand wcm:action="add">

                <Order>1</Order>

                <Path>c:\windows\System32\sysprep\sysprep.exe /oobe /generalize /reboot </Path>

              </RunSynchronousCommand>

            </RunSynchronous>

          </component>

        </settings>

        <settings pass="oobeSystem">

          <component name="Microsoft-Windows-Shell-Setup" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" processorArchitecture="amd64">

            <OOBE>

              <HideEULAPage>true</HideEULAPage>

              <ProtectYourPC>1</ProtectYourPC>

              <SkipMachineOOBE>true</SkipMachineOOBE>

              <NetworkLocation>Work</NetworkLocation>

              <SkipUserOOBE>true</SkipUserOOBE>

            </OOBE>

            <ProductKey>%Win7ProdKey%</ProductKey>

            <RegisteredOwner>User</RegisteredOwner>

            <RegisteredOrganization>LANDesk</RegisteredOrganization>

            <UserAccounts>

              <AdministratorPassword>

                <PlainText>true</PlainText>

                <Value>%AdminPass%</Value>

              </AdministratorPassword>

            </UserAccounts>

            <AutoLogon>

              <Enabled>true</Enabled>

              <Username>useraccount</Username>

              <LogonCount>5</LogonCount>

            </AutoLogon>

          </component>

        </settings>

        <settings pass="specialize">

          <component name="Microsoft-Windows-Shell-Setup" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" processorArchitecture="amd64">

            <ComputerName>%ldHostname%</ComputerName>

            <CopyProfile>true</CopyProfile>

          </component>

         </settings>

      </unattend>

        • 1. Re: Unattend.xml Public Variables
          sy0385 Rookie

          Additional information:

           

          I created the image in audit mode without creating a user account. When I talked to our LANDesk provider he said I have to go back to the pre-syspreped image and create the user account and then go through the process again. I don't feel this is correct since the script is creating a user account, I just cant log into it. Any thoughts on this?

          • 2. Re: Unattend.xml Public Variables
            jParnell Specialist

            You're a little bit confused there...

             

            1.) The section designated <AdministratorPassword> is ONLY for the built in account Administrator. Your unattend.xml doesn't even enable the account, just sets the password for it, so the Administrator account is still disabled, and cannot be logged in if specified in <AutoLogon>.

            2.) The <AutoLogon> section will simply specify an account to log into... if this is a domain account, the username would be domain\account or [email protected]. If it is a local account, it will just be account. However, the account must exist either on the domain (if being joined) or on the local machine before being sysprep'ed and captured.

            3.) Your <AutoLogon> section does not specify a password to use with the account, just a username, so it is trying to login with a blank password.

            3 of 3 people found this helpful
            • 3. Re: Unattend.xml Public Variables
              sy0385 Rookie

              Yes, confused is a good way to describe it .  I was thrown off by seeing the account name from the unattend.xml file ready to be logged in. Thus I figured it was a legitimate account. After talking to our LANDesk provider, he insisted I go back to the image and create that account. I didnt think that is necessary since the unattend.xml should create the account. After doing more research, I came accross the article that stated the user account must be named Administrator. I changed the account name and I was able to login with the password I set for it.

               

              Some other useful information, for troubleshooting the public variables I added a "wait" for 8 minutes after the unattend file is injected. I opened a new console and navigated to the file path where I can view all of the information in the public variables and sure enough, it was correct

              • 4. Re: Unattend.xml Public Variables
                jParnell Specialist

                We've all been there, and we've all gotten frustrated at what we thought was obvious when it was in fact obscure, and we've all reached out to some forum after bashing our heads. My grandfather always told me "The lessons learned the hard way are the lessons that stick with you longest". Reach out if you need anything else.