Friday, March 30, 2012

Enable Autologon in MDT 2010

Eventhough my blog mainly focusses on SCCM, I'd like to add a post on how to enable autologon after finishing a TS in MDT 2010. By default, the autologon information which come from your unattend.xml answer file, is cleaned by the LTICleanup.wsf and LiteTouch.wsf script at the end of the TS. To avoid this behaviour, you could comment out the lines that cause this.

Open up LTICleanup.wsf and search for the following line: Clear the autologon registry keys
You can comment out the lines responsible for removing the autologin by adding a ' in from of the line. See the example below:

LTICleanup.wsf:

'//----------------------------------------------------------------------------
'//  Clear the autologon registry keys
'//----------------------------------------------------------------------------
'oLogging.CreateEntry "Removing AutoAdminLogon registry entries", LogTypeInfo
'On Error Resume Next
'oShell.RegWrite "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\AutoAdminLogon", "0", "REG_SZ"
'oShell.RegWrite "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\DefaultUserName", "", "REG_SZ"
'oShell.RegWrite "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\DefaultDomainName", "", "REG_SZ"
'oShell.RegDelete "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\DefaultPassword"
'oShell.RegWrite "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\AutoLogonCount", &H00000000, "REG_DWORD"
'On Error Goto 0

LiteTouch.wsf:

'oShell.RegWrite "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\AutoAdminLogon", "0", "REG_SZ"
'On Error Goto 0

1 comment:

  1. Hi, Nice post, I was wondering if it was possible to do the same thing without modifying the already existing script, I'll need to keep the autologin on some deployment but I have several task sequence on the production deployment share that will not want to keep it. I don't know how to re enable it after this script since it seems to be invoked at the very end of the deployment even after the summary...
    Thanks for sharing.

    ReplyDelete