none
[SOLVED] Registry Settings set Within Task Sequence not Sticking it Seems...?

    Soru

  • So I've successfully deployed an image I captured to my test machine & all looks well on that front. Post installation though I realized I wanted to make two adjustments to the image before I considered it 'complete':

    • Enable autologon for a local guest account
    • Disable the CTRL+ALT+DEL prompt

    For the autologon I created a batch file that adds these registry keys:

    reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon" /v "DefaultUserName" /t REG_SZ /f /d "GUEST_USER_NAME"
    reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon" /v "DefaultPassword" /t REG_SZ /f /d "GUEST_PASSWORD"
    reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon" /v "AutoAdminLogon" /t REG_SZ /f /d "1"

    And for disabling the CTRL+ALT+DEL prompt I tried two methods:

    1. Batch file
      reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v "DisableCAD" /t REG_DWORD /f /d 1
      reg delete "HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Winlogon" /v "DisableCAD" /f
      reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v "DisableCAD" /f
      reg delete "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System" /v "DisableCAD" /f
    2. Microsoft Fix it 50406 - http://support.microsoft.com/kb/308226

    Unfortunately though, it seems that none of these work.  After the system finishes the Task Sequence, I'm looking at a 'CTRL+ALT+DEL' prompt, and after doing the three finger salute I'm asked to login.  So I login as the Administrator & check the registry keys and they're not set properly.  If I re-run the same scripts it works fine, but again, its not until *after* someone manually logs on & runs them that it sticks.

    To double check my work I went as far as setting the registry keys & then re-querying them after & logging the output to a file.  Sure enough, everything is set properly, but after the reboot, they either no longer exist, or have been changed.

    Is this by design or is there a workaround?

    Screenshot of Task Sequence - The scripts I'm running are the last two in the list.


    • Düzenleyen JuliusPIV 28 Haziran 2012 Perşembe 19:20
    18 Haziran 2012 Pazartesi 15:24

Yanıtlar

  • When the TS finishes it does a cleanup, part of this is to remove the auto logon information from the reg that MDT puts in to allow the auto logon of the administrator account.

    For the staff deployments in our University I've the image configured to reboot after the TS is finished and do an auto logon with a new local account and present the IT support person doing the deployment with an information page, it's fairly similar to what you're trying to do I think.

    Here's what I do;

    I use Johan's Final Config - http://www.deployvista.com/Default.aspx?tabid=78&EntryID=61 as the final step of the TS. Then I've added in a line in his Z-FinalConfig.hta code.

    Original;

       StatusArea.InnerHTML=StatusArea.InnerHTML & "<BR>" & "Configuration Complete, rebooting client... "
       oShell.run "shutdown /f /r /t 30",1,False
       CountArea.InnerHTML=""
       Exit Function

    My line added in;

       StatusArea.InnerHTML=StatusArea.InnerHTML & "<BR>" & "Configuration Complete, rebooting client... "
       oShell.run "shutdown /f /r /t 30",1,False
       oShell.run "c:\temp\Auto_3.bat"
       CountArea.InnerHTML=""
       Exit Function

    The Auto_3.bat file is used to add my new auto login registry settings after the cleanup has taken the administrator account auto logon ones out.

    Hope that helps

    S

    • Yanıt Olarak İşaretleyen JuliusPIV 28 Haziran 2012 Perşembe 19:20
    19 Haziran 2012 Salı 08:47

Tüm Yanıtlar

  • When the TS finishes it does a cleanup, part of this is to remove the auto logon information from the reg that MDT puts in to allow the auto logon of the administrator account.

    For the staff deployments in our University I've the image configured to reboot after the TS is finished and do an auto logon with a new local account and present the IT support person doing the deployment with an information page, it's fairly similar to what you're trying to do I think.

    Here's what I do;

    I use Johan's Final Config - http://www.deployvista.com/Default.aspx?tabid=78&EntryID=61 as the final step of the TS. Then I've added in a line in his Z-FinalConfig.hta code.

    Original;

       StatusArea.InnerHTML=StatusArea.InnerHTML & "<BR>" & "Configuration Complete, rebooting client... "
       oShell.run "shutdown /f /r /t 30",1,False
       CountArea.InnerHTML=""
       Exit Function

    My line added in;

       StatusArea.InnerHTML=StatusArea.InnerHTML & "<BR>" & "Configuration Complete, rebooting client... "
       oShell.run "shutdown /f /r /t 30",1,False
       oShell.run "c:\temp\Auto_3.bat"
       CountArea.InnerHTML=""
       Exit Function

    The Auto_3.bat file is used to add my new auto login registry settings after the cleanup has taken the administrator account auto logon ones out.

    Hope that helps

    S

    • Yanıt Olarak İşaretleyen JuliusPIV 28 Haziran 2012 Perşembe 19:20
    19 Haziran 2012 Salı 08:47
  • Hi somahony73 - Thank you for taking the time to respond & for this tip! 

    I read in some other posts that the TS did perform a registry clean up of sorts, but I haven't been able to find out which keys it cleans out and which remain the same.  Johan's proposed solution doesn't seem like a bad idea & may be the way to go

    In an effort to not spend too much time on trial & error, does it clear out the runonce registry keys?

    20 Haziran 2012 Çarşamba 12:04
  • Not sure about runonce to be honest.

    S

    20 Haziran 2012 Çarşamba 14:08