IT Management Suite

  • 1.  Problem with autologon during sysprep on Windows 7

    Posted Jun 12, 2012 06:17 AM

    Hello,

     

    I'm trying to create image of Windows 7 in Deployment 6.9 and I faced the problem with automatic login after deploying image. But let's start from beginning, here is what I do:

    1. I install fresh Windows 7 on PC and create second administrative account (as sysprep will locked the one named Administrator) admin2 with the same password

    2. Run sysprep with "Generalize" option checked

    3. Using Deployment Console I create an image with "Prepare using Sysprep" option checked

    4. When image is created I deploy it on a fresh PC

    When Ghost ends deploying the image on harddrive (Using Distribute disk image task), and restart the computer, it boots to automation to do this script:

    rem Deploy Anywhere
    set disk=none
    if exist "C:\WINDOWS\PANTHER" set disk=C:
    if exist "D:\WINDOWS\PANTHER" set disk=D:
    if exist "E:\WINDOWS\PANTHER" set disk=E:
    if exist "F:\WINDOWS\PANTHER" set disk=F:
    if exist "G:\WINDOWS\PANTHER" set disk=G:
    :da
    REM Inject RANDOMUSER Registry Value
    rem Reg load HKLM\TempHive %disk%\Windows\system32\config\software
    rem Reg Add "HKLM\TempHive\Altiris\Client Service" /v RANDOMUSER /t REG_SZ /d "" /f
    rem Reg unload HKL\TempHive
    del X:\Windows\inf\atrsdfw.inf
    copy Y:\Ghost\SMEUTIL.SYS "%disk%\Windows\System32\drivers"

    Y:
    cd \
    cd Ghost
    GhDplyAw32.exe /target="%disk%\Windows" /ddb="Y:\DriversDB"

    if errorlevel 3 goto da

    After this, computer boots to production to finish sysprep. After a while on the login screen I have an error that username or password is not correct.

    When I enter admin password ("Administrator" username is already entered), everything goes well to the end, but I wish to have this error gone, so it will auto login on admin account during this step.

     

    Maybe during script execution in PXE I can input some registry entry to enable autologon on administrator account, or the problem is in my config file for sysprep. I have edited standardwes7.xml file found on Deployment Share. I've changed this part:

    <AutoLogon>
        <Password>
         <Value>P@ssword<Value>
         <PlainText>false</PlainText>
        </Password>
        <Domain></Domain>
        <Enabled>true</Enabled>
        <LogonCount>3</LogonCount>
        <Username>admin2</Username>
       </AutoLogon>
       <UserAccounts>
        <LocalAccounts>
         <LocalAccount wcm:action="add">
          <Password>
           <Value>P@ssword<Value>
           <PlainText>false</PlainText>
          </Password>
          <Description>Account for administering the computer or domain</Description>
          <DisplayName>admin2</DisplayName>
          <Group>Administrators</Group>
          <Name>admin2</Name>
         </LocalAccount>
        </LocalAccounts>
       </UserAccounts>

    There is also a part, that I have left unchanged:

    <RunSynchronous>
                    <RunSynchronousCommand wcm:action="add">
                        <Order>1</Order>
                        <Path>net user administrator /active:yes</Path>
                    </RunSynchronousCommand>
                    <RunSynchronousCommand wcm:action="add">
                        <Order>2</Order>
                        <Path>reg add "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon" /v AutoAdminLogon /t REG_SZ /d 1 /f</Path>
                    </RunSynchronousCommand>
                    <RunSynchronousCommand wcm:action="add">
                        <Order>3</Order>
                        <Path>reg add "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultUserName /t REG_SZ /d User /f</Path>
                    </RunSynchronousCommand>
                    <RunSynchronousCommand wcm:action="add">
                        <Order>4</Order>
                        <Path>reg add "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultPassword /t REG_SZ /d User /f</Path>
                    </RunSynchronousCommand>
                    <RunSynchronousCommand wcm:action="add">
                        <Order>5</Order>
                        <Path>reg add "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon" /v ForceAutoLogon /t REG_DWORD /d 1 /f</Path>
                    </RunSynchronousCommand>
        <RunSynchronousCommand wcm:action="add">
         <Order>6</Order>
         <Path>reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\CurrentVersion\NetworkList\Signatures\FirstNetwork" /v Category /t REG_DWORD /d 00000000 /f</Path>
        </RunSynchronousCommand>
                </RunSynchronous>

    So here should be added registry entry to configure this first autologon, but it doesn't work for me. Can someone help me with this issue? What have I do to force my PC to login automatically during sysprep?

     

     

    *Password provided in examples are not the same as I use. I just wanted not to show everybody our original password.



  • 2.  RE: Problem with autologon during sysprep on Windows 7

    Posted Jun 12, 2012 09:30 AM

    For instance, instead of "P@ssword" (very very common BTW) try "AdamLovesEve" or something really basic without any @ signa nd see if that helps.  I know that in another version of the product the @ sign caused problems, so I'd be curious.

    I may be TOTALLY off base, but why not try?



  • 3.  RE: Problem with autologon during sysprep on Windows 7

    Posted Jun 12, 2012 09:49 AM

    I should note it in original post, but for security reasons I didn't paste my original password. Password that I use doesnt have "@" sign.



  • 4.  RE: Problem with autologon during sysprep on Windows 7

    Posted Jun 12, 2012 12:23 PM

    There is no need to create a second Administrator account, since you are re-enabling the account with this command:
    <Path>net user administrator /active:yes</Path>
     

    The rest of the part that you did not modify (except the last command) are changes to the registry to automatically login as a local account with the name 'User' and with the password 'User'. I expect that this is conflicting with your attempt to automatically login as your admin2 account.

    Here is more information on enabling the administrator account and autologon as administrator. This was written for Windows Embedded Standard (WES7), but is valid for other versions of Windows 7.

    Hope this helps,

    David

    Windows Outreach Team - IT Pro



  • 5.  RE: Problem with autologon during sysprep on Windows 7

    Posted Jul 04, 2012 03:44 AM

    Take a look at LogonExpert. It can be easy deployed via Active Directory and saves passwords by AES encrypting



  • 6.  RE: Problem with autologon during sysprep on Windows 7

    Posted Jul 06, 2012 10:22 AM

    David may have provided your answer already, but if you are joining the PC to the domain in the same answer file I'd like to point out a bug that exists in Win7. The AutoLogon section will not work correctly for the local administrator if the PC is joined to the domain. It will log in Administrator but will create the profile as ".\Administrator" which creates havok in things that expect it to just be "Administrator" such as the option to create the default profile from the Administrator profile during sysprep. You are better off removing the AutoLogon section altogether and modifying the RunSynchronous commands to log on Administrator instead of "User".