Autologin Microsoft Deployment Toolkit aktivieren

Problemstellung: Die Keys werde immer wieder durch Abschlussarbeiten des MDT während des Deployments resettet

Zunächst werden dafür die Eigenschaften der Deployment Workbench aufgerufen und unter Settings folgender Eintrag hinterlegt:

SkipALCleanup=

Task Sequence Variable in Task Sequence setzen:

Deployment Dateien bearbeiten LiteTouch.wsf und LTICleanup.wsf

LTICleanup.wsf:

'//----------------------------------------------------------------------------
		'//  Clear the autologon registry keys
		'//----------------------------------------------------------------------------

		oLogging.CreateEntry "Removing AutoAdminLogon registry entries", LogTypeInfo

		If oEnvironment.Item("SkipALCleanup") <> 1 Then
			On Error Resume Next

			oLogging.CreateEntry "Setting Autologon to 0", LogTypeInfo

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

			oLogging.CreateEntry "Setting DefaultUsername to Nothing", LogTypeInfo

			oShell.RegWrite "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\DefaultUserName", "", "REG_SZ"

			oLogging.CreateEntry "Setting DefaultDomainName to Nothing", LogTypeInfo

			oShell.RegWrite "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\DefaultDomainName", "", "REG_SZ"

			oLogging.CreateEntry "Deleting DefaultPassword", LogTypeInfo

			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
		
		End if

LiteTouch.wsf: 

Sub CleanupStartItems

		' Clean up the run registry entry (if it exists)

		On Error Resume Next
		oShell.RegDelete "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunOnce\LiteTouch"
		On Error Goto 0


		' Clean up the shortcut (if it exists)

		If oFSO.FileExists(oShell.SpecialFolders("AllUsersStartup") & "\LiteTouch.lnk") then
		
			oFSO.DeleteFile oShell.SpecialFolders("AllUsersStartup") & "\LiteTouch.lnk"
			
		End if

		On Error Resume Next

		 If oEnvironment.Item("SkipALCleanup") <> 1 Then
 
		 	oShell.RegWrite "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\AutoAdminLogon", "0", "REG_SZ"

		End If 
		
			On Error Goto 0

		oLogging.CreateEntry "CleanStartItems Complete", LogTypeInfo

End Sub

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht.