none
How to Enable Local Administrator account during sysprep installation?

    Question

  •  

    Hi,

     

    I have a loca administrator and password built-in before sysprep, but when I install the sysprepped image,

    The local administrator goes disabled by default, so I had to change it to enable in the local security settings.

     

    Is there any way to enable it during the vista installation?

     

    I saw an article about putting a synchronous command in specialize section "net use administrator /active:yes"

    Is that all I have to do or I need more settings to add to oobesystems section?

     

    Grateful for you guru's advice.

     

    Cheers -  Jason

     

     

    Wednesday, August 22, 2007 6:29 AM

Answers

  •  

    opk.chm has a section that talks about how to enable built-in admin account:

     

    Enable the Built-in Administrator Account

    There are several ways to enable the built-in Administrator account.

    • Use the net user command

      Run the following command to enable the Administrator account.

      net user administrator /active:yes

      You can run this command after Windows completes installation.

      -OR-

    • Use the AutoLogon unattended Setup setting

      You can enable the built-in Administrator account during unattended installations by setting the AutoLogon setting to Administrator in the Microsoft-Windows-Shell-Setup component. This will enable the built-in Administrator account, even if a password is not specified in the AdministratorPassword setting.

      You can create an answer file by using Windows System Image Manager (Windows SIM).

      The following sample answer file. shows how to enable the Administrator account, specify an Administrator password, and automatically log onto the system.

         <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
            <AutoLogon>
               <Password>
                  <Value>SecurePasswd123</Value> 
                  <PlainText>true</PlainText> 
               </Password>
               <Username>Administrator</Username> 
               <Enabled>true</Enabled> 
               <LogonCount>5</LogonCount> 
            </AutoLogon>
            <UserAccounts>
               <AdministratorPassword>
                  <Value> SecurePasswd123</Value> 
                  <PlainText>true</PlainText> 
               </AdministratorPassword>
            </UserAccounts>
         </component>
      -OR-

    • Use the Local Users and Groups MMC console

      Change the properties of the Administrator account by using the Local Users and Groups MMC console.

      1. Open the MMC console and select Local Users and Groups.

      2. Right-click the Administrator account and select Properties. The Administrator Properties window appears.

      3. On the General tab, uncheck the Account is Disabled box.

      4. Close the MMC console.

      Administrator access is now enabled.

     

    if you use the unattend approach, I would use setting in oobeSystem pass. Try that and let us know.

    Thanks.

     

    Wednesday, August 22, 2007 5:04 PM
  •  

    Hi mshou-MS,

     

    Thanks a lot for your help! I made it with the following codes.

    With the following, my built-in local admin account/password from a master build is enabled and Create user account

    screen during Vista setup doesn't appear.

     

    Added To Specialize pass

            <component name="Microsoft-Windows-Deployment" processorArchitecture="x86" 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>net user administrator /active:yes</Path>
                    </RunSynchronousCommand>

     

    Added to oobesystem pass

    <UserAccounts>
        <LocalAccounts>
         <LocalAccount wcm:action="add">
          <Password>
           <Value>PasswordGoesHere</Value>
           <PlainText>true</PlainText>
          </Password>
          <Description>Local Administrator</Description>
          <DisplayName>Administrator</DisplayName>
          <Group>Administrators</Group>
          <Name>Administrator</Name>
         </LocalAccount>
        </LocalAccounts>
       </UserAccounts>

    Friday, August 24, 2007 5:05 AM

All replies

  •  

    opk.chm has a section that talks about how to enable built-in admin account:

     

    Enable the Built-in Administrator Account

    There are several ways to enable the built-in Administrator account.

    • Use the net user command

      Run the following command to enable the Administrator account.

      net user administrator /active:yes

      You can run this command after Windows completes installation.

      -OR-

    • Use the AutoLogon unattended Setup setting

      You can enable the built-in Administrator account during unattended installations by setting the AutoLogon setting to Administrator in the Microsoft-Windows-Shell-Setup component. This will enable the built-in Administrator account, even if a password is not specified in the AdministratorPassword setting.

      You can create an answer file by using Windows System Image Manager (Windows SIM).

      The following sample answer file. shows how to enable the Administrator account, specify an Administrator password, and automatically log onto the system.

         <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
            <AutoLogon>
               <Password>
                  <Value>SecurePasswd123</Value> 
                  <PlainText>true</PlainText> 
               </Password>
               <Username>Administrator</Username> 
               <Enabled>true</Enabled> 
               <LogonCount>5</LogonCount> 
            </AutoLogon>
            <UserAccounts>
               <AdministratorPassword>
                  <Value> SecurePasswd123</Value> 
                  <PlainText>true</PlainText> 
               </AdministratorPassword>
            </UserAccounts>
         </component>
      -OR-

    • Use the Local Users and Groups MMC console

      Change the properties of the Administrator account by using the Local Users and Groups MMC console.

      1. Open the MMC console and select Local Users and Groups.

      2. Right-click the Administrator account and select Properties. The Administrator Properties window appears.

      3. On the General tab, uncheck the Account is Disabled box.

      4. Close the MMC console.

      Administrator access is now enabled.

     

    if you use the unattend approach, I would use setting in oobeSystem pass. Try that and let us know.

    Thanks.

     

    Wednesday, August 22, 2007 5:04 PM
  •  

    Hi, mshou-MS

     

    Thanks for your information. Adding "net ...." worked fine.

     

    But the intention to do is to skip 'Create User Account' section during windows setup.

     

    It appeared even though the local admin was enabled.

     

    Is there any way to skip the section?

     

    Cheers.

    Thursday, August 23, 2007 11:51 PM
  •  

    Hi mshou-MS,

     

    Thanks a lot for your help! I made it with the following codes.

    With the following, my built-in local admin account/password from a master build is enabled and Create user account

    screen during Vista setup doesn't appear.

     

    Added To Specialize pass

            <component name="Microsoft-Windows-Deployment" processorArchitecture="x86" 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>net user administrator /active:yes</Path>
                    </RunSynchronousCommand>

     

    Added to oobesystem pass

    <UserAccounts>
        <LocalAccounts>
         <LocalAccount wcm:action="add">
          <Password>
           <Value>PasswordGoesHere</Value>
           <PlainText>true</PlainText>
          </Password>
          <Description>Local Administrator</Description>
          <DisplayName>Administrator</DisplayName>
          <Group>Administrators</Group>
          <Name>Administrator</Name>
         </LocalAccount>
        </LocalAccounts>
       </UserAccounts>

    Friday, August 24, 2007 5:05 AM
  • Does this process work if the local admin account has bee renamed??
    Thursday, June 18, 2009 8:42 PM
  • I am using the following xml file with this command: 

    sysprep.exe /generalize /unattend:unattend.xml

    Sysprep runs fine and in the end restarts the computer. When I try to login as administrator it tells me the account is disabled. I am NOT usaing any password for imaging purposes (blank password). Can anyone help me figure out what I am doing wrong here? 


    <unattend xmlns="urn:schemas-microsoft-com:unattend">
        <settings pass="specialize">
            <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">
                <AutoLogon>
                    <Username>Administrator</Username>
      <Enabled>true</Enabled>
                </AutoLogon>
                <CopyProfile>true</CopyProfile>
            </component>
        </settings>
        <cpi:offlineImage cpi:source="catalog:**path**windows7enterprise/sources/install_windows 7 enterprise.clg" xmlns:cpi="urn:schemas-microsoft-com:cpi" />
    </unattend>

     

    Thanks!


    Mayur
    Monday, April 12, 2010 7:10 PM
  • Hi Mayur,

     

    Did you ever figure out what is happening to cause your issue above?  Also, do you use SCCM for deployments of your images?  I ask because I am having trouble like yourself where I have my answer file setup correctly and am able to pull the image I create back down using ImageX without issue; only when I upload my .wim to SCCM and try to deploy here am I'm having trouble.  I'm needing to setup for large scale deployments for my offices located all over the country.  I have a working Win7 Task Sequence that pulls my Win7 image and then sets up all of my specified apps without issue, just when trying to dump a complete image through SCCM that I'm having trouble.  Any help is appreciated.

     

    Thank you,

    Kyle

    Wednesday, September 07, 2011 2:07 PM