Sunday, June 21, 2020

MDT Sysprep and Capture Fails - WinMain:The sysprep dialog box returned FALSE


In my case, the Sysprep shows running during the task sequence, but the machine restarts immediately. Upon restart, the TS fails with the below error




















I have checked the setupact.log, but everything looks alright except the below line.

WinMain:The sysprep dialog box returned FALSE

So I have checked the setuperr.log and only found the below lines

Error      [0x0f0043] SYSPRP WinMain:The sysprep dialog box returned FALSE
Error         [0x0f0043] SYSPRP WinMain:The sysprep dialog box returned FALSE
Error      [0x0f0043] SYSPRP WinMain:The sysprep dialog box returned FALSE

Most of the time, Sysprep fails due to one or more windows app.so I always run the below command before the capture.

Get-AppxPackage -allusers | where-object {$_.name –notlike "*calc*"} | where-object {$_.name –notlike "*photo*"} | Remove-AppxPackage

The capture was still failing. I have double-checked by running the below command and made sure that the windows apps are removed. (Note: I haven’t removed any .net framework apps)

Run Get-AppxPackage -AllUser | Where PublisherId -eq 8wekyb3d8bbwe | Format-List -Property PackageFullName,PackageUserInformation

Below is what I did to fix my issue with Sysprep.

        Made sure Windows is up to date by running windows update.

      Updated Java to the latest version

     Checked the registry Sysprep registry keys (In My case CleanupState DWord was missing)

HKEY_LOCAL_MACHINE\SYSTEM\Setup\Status\SysprepStatus\CleanupState\ 
Set to value: 2

HKEY_LOCAL_MACHINE\SYSTEM\Setup\Status\SysprepStatus\GeneralizationState\Set to value: 7
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsNT\CurrentVersion
\SoftwareProtectionPlatform\SkipRearm 
Set to value: 1 


     Delete the Sysprep Panther folder (C:\windows\system32\sysprep\panther)


        Restarted the machine and after the restart, the Sysprep ran successfully in Task Sequence.



How to Install Windows 11 VM on ESXi Host for Capturing MDT Image

 Once you create the VM on the ESXi Host, Boot from Windows 11 ISO You will get the below Error message. Press Shift +F10 and Enter the belo...