An OSD task sequence doesn't continue after Windows Setup or an in-place upgrade finishes

Applies to: System Center Configuration Manager (current branch - version 1710)System Center Configuration Manager (current branch - version 1802)System Center Configuration Manager (current branch - version 1806)

Symptoms


When you run an OS deployment task sequence in Configuration Manager, you experience the following issues:

  • A Refresh or New Computer task sequence doesn’t continue after Windows Setup finishes during the Setup Windows and ConfigMgr step.

    The following entry is logged in the %windir%\panther\unattendGC\Setupact.log file:
  • An In-Place Upgrade task sequence doesn’t continue after the in-place upgrade finishes during the Upgrade Operating System step.

    The following is logged in the %windir%\panther\unattendGC\Setupact.log file:

These issues usually occur when you deploy a nonenterprise edition of Windows, such as Windows Professional edition, Windows Embedded, or Windows IoT.

Cause


These issues occur because an OEM product key is used during Windows deployment. When an OEM product key is used, Setupcomplete.cmd is disabled. This behavior occurs in both Windows 8.1 and Windows 10. See the following information from Windows Deployment Issues:

[September 2012] Changes in Out-Of-Box (OOBE) Experience

Oobe.cmd and Setupcomplete.cmd are disabled if an OEM product key is used. This is to ensure that end-users reach Start as quickly as possible. If you have any tools or services that use this infrastructure, these must be changed to tasks that occur after the OOBE.

SetupComplete.cmd is a custom script that runs during or after the Windows Setup process. It contains commands to restart the Configuration Manager task sequence after Windows Setup finishes. When SetupComplete.cmd is disabled, the task sequence can't continue after Windows Setup finishes.

Resolution


To fix the issue, specify the KMS Client Setup Key in the locations where the OEM product key is specified for the version of Windows that you want to deploy. For example, specify the KMS Client Setup Key in the Apply Windows Settings or the Upgrade Operating System step.

If the OEM product key must be used, follow these steps in addition to specifying the KMS Client Setup Key:

  1. Add a Run Command Line step after the Setup Windows and ConfigMgr step in a Refresh or New Computer task sequence, or after the Upgrade Operating System step in an In-Place Upgrade task sequence.
  2. In the Run Command Line step, use changepk.exe or slmgr.vbs to specify the OEM key in Command line.

If the OEM key in the BIOS or firmware of the device must be used, run the following PowerShell command to get the key:

Get-CIMInstance SoftwareLicensingService | Select -ExpandProperty OA3xOriginalProductKey

More information


OEM product key locations

The OEM product key can be specified in the following locations:

  • In a Refresh or New Computer task sequence:
    • In the Apply Windows Settings step.
    • In a custom answer file (Unattend.xml). This file is usually specified in the Apply Operating System step.
    • Through variables such as OSDProductKey or ProductKey (in an MDT-integrated task sequence)
  • In an In-Place Upgrade task sequence:
    • In the Upgrade Operating System step.
    • Through the OSDSetupAdditionalUpgradeOptions variable by using the /PKey command line option.

The OEM product key can also be obtained automatically by Windows Setup from the BIOS or firmware of the device. In this case, the following entry is logged in the %windir%\panther\Setupact.log file: