none
Windows 10 upgrade skipping the Post-Processing group

    Question

  • Upgrading Windows 7 Enterprise x64 to Windows 10 Enterprise x64. The upgrade task sequence appears to work fine with no errors, but the Post-Processing group does not run. Looking at the smsts.log file, it is because "Registry value HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Windows\Win10UpgradeStatusCode does not exist".

    What puts that registry value there, and why would it NOT put it there? The upgrade itself seemed to go well.

    Thursday, January 14, 2016 6:40 PM

Answers

  • I wanted to post a workaround for this issue that I received from Microsoft Support. Their suggestion was to simply write the missing reg key with the SetupComplete.cmd file.

    The modified version of SetupComplete.cmd is shown below:

    @echo off
    
    for %%d in (c d e f g h i j k l m n o p q r s t u v w x y z) do if exist %%d:\MININT\Scripts\setupcomplete.cmd ( 
    reg add "HKEY_LOCAL_MACHINE\SYSTEM\Setup" /v SetupType /t REG_DWORD /d 2 /f
    reg add "HKEY_LOCAL_MACHINE\SYSTEM\Setup" /v CmdLine /t REG_SZ /d "%%d:\MININT\Scripts\setupcomplete.cmd" /f 
    echo %DATE%-%TIME% Registered Setupcomplete.cmd in registry >> %%d:\MININT\SMSOSD\OSDLOGS\setupcomplete.log)
    
    reg add "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Windows" /v Win10UpgradeStatusCode /t REG_SZ /d "SUCCESS" /f
    
    for %%d in (c d e f g h i j k l m n o p q r s t u v w x y z) do if exist %%d:\MININT\Scripts\LTIBootstrap.vbs (wscript.exe %%d:\MININT\Scripts\LTIBootstrap.vbs ) 
    
    echo %DATE%-%TIME% Successfully upgraded windows, resetting registry >> %WINDIR%\CCM\Logs\setupcomplete.log
    reg add "HKEY_LOCAL_MACHINE\SYSTEM\Setup" /v SetupType /t REG_DWORD /d 0 /f
    reg add "HKEY_LOCAL_MACHINE\SYSTEM\Setup" /v CmdLine /t REG_SZ /d "" /f
    for %%d in (c d e f g h i j k l m n o p q r s t u v w x y z) do if exist %%d:\MININT\Scripts\setupcomplete.cmd ( 
    echo %DATE%-%TIME% Exiting SetupComplete.cmd >> %%d:\MININT\SMSOSD\OSDLOGS\setupcomplete.log)
    


    • Marked as answer by David Bloomer Wednesday, February 10, 2016 7:46 PM
    Tuesday, February 9, 2016 9:59 PM

All replies

  • Report this as a bug using Connect

    Logs are very important. https://keithga.wordpress.com/2014/10/24/video-mdt-2013-log-files-basics-bdd-log-and-smsts-log/ Mention any customizations you have made.

    Thursday, January 14, 2016 6:59 PM
    Moderator
  • Ok, did that. Any other ideas? I've looked through setupact and setuperr logs and don't find any mention of that reg key. Any idea what is supposed to write that reg value?
    Friday, January 15, 2016 1:23 AM
  • Having the same issue, please update the post if you find a solution. I just want to run a few scripts after the upgrade is finished to change some W10 settings and add a custom start menu.

    Thanks

    Friday, January 15, 2016 12:22 PM
  • In your logs, does it say that the reg key doesn't exist?
    Friday, January 15, 2016 5:55 PM
  • It's the SetupRollBack.cmd script that set's the value, and the Litetouch.wsf that looks for it. Are you using MDT 2013 Update 2? (Build 8330)

    / Johan


    Regards / Johan Arwidmark Twitter: @jarwidmark Blog: http://www.deploymentresearch.com FB: www.facebook.com/deploymentresearch

    Friday, January 15, 2016 6:13 PM
    Moderator
  • Yes, I am using MDT 2013 Update 2.

    Here is the contents of my SetupComplete.cmd file from \Scripts

    @echo off
    
    for %%d in (c d e f g h i j k l m n o p q r s t u v w x y z) do if exist %%d:\MININT\Scripts\setupcomplete.cmd ( 
    reg add "HKEY_LOCAL_MACHINE\SYSTEM\Setup" /v SetupType /t REG_DWORD /d 2 /f
    reg add "HKEY_LOCAL_MACHINE\SYSTEM\Setup" /v CmdLine /t REG_SZ /d "%%d:\MININT\Scripts\setupcomplete.cmd" /f 
    echo %DATE%-%TIME% Registered Setupcomplete.cmd in registry >> %%d:\MININT\SMSOSD\OSDLOGS\setupcomplete.log)
    
    for %%d in (c d e f g h i j k l m n o p q r s t u v w x y z) do if exist %%d:\MININT\Scripts\LTIBootstrap.vbs (wscript.exe %%d:\MININT\Scripts\LTIBootstrap.vbs ) 
    
    echo %DATE%-%TIME% Successfully upgraded windows, resetting registry >> %WINDIR%\CCM\Logs\setupcomplete.log
    reg add "HKEY_LOCAL_MACHINE\SYSTEM\Setup" /v SetupType /t REG_DWORD /d 0 /f
    reg add "HKEY_LOCAL_MACHINE\SYSTEM\Setup" /v CmdLine /t REG_SZ /d "" /f
    for %%d in (c d e f g h i j k l m n o p q r s t u v w x y z) do if exist %%d:\MININT\Scripts\setupcomplete.cmd ( 
    echo %DATE%-%TIME% Exiting SetupComplete.cmd >> %%d:\MININT\SMSOSD\OSDLOGS\setupcomplete.log)

    Friday, January 15, 2016 6:21 PM
  • Yes, my logs says reg key doesn't exist.

    I am using offline media, which could be the problem.

    Dave

    Friday, January 15, 2016 7:19 PM
  • I don't see where in SetupComplete.cmd that it writes the value 'HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Windows\Win10UpgradeStatusCode'?
    Friday, January 15, 2016 9:40 PM
  • Hi David,

    Its the SetupRollBack.cmd file you should be looking at:

    @echo off

    for %%d in (c d e f g h i j k l m n o p q r s t u v w x y z) do if exist %%d:\MININT\Scripts\LTIBootstrap.vbs (
    echo %DATE%-%TIME% TSMBootstrap did not request reboot, resetting registry >> %%d:\MININT\SMSOSD\OSDLOGS\SetupRollback.log
    reg add "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Windows" /v Win10UpgradeStatusCode /t REG_SZ /d "Failure" /f
    reg add "HKEY_LOCAL_MACHINE\SYSTEM\Setup" /v SetupType /t REG_DWORD /d 0 /f
    reg add "HKEY_LOCAL_MACHINE\SYSTEM\Setup" /v CmdLine /t REG_SZ /d "" /f
    echo %DATE%-%TIME% Launching TSMBootstrapper to fininsh TS >> %%d:\MININT\SMSOSD\OSDLOGS\SetupRollback.log
    wscript.exe %%d:\MININT\Scripts\LTIBootstrap.vbs )

    Dave

    Saturday, January 16, 2016 5:22 PM
  • Oops, I was looking at the wrong file. Thanks for pointing that out. I see where the SetupRollback.cmd file puts a 'FAILURE' value into that reg key, but how does a 'SUCCESS' value get there?
    Tuesday, January 19, 2016 10:16 PM
  • It appears the UpgradeSummary.wsf script does
    • Edited by dmathieu2 Thursday, January 21, 2016 7:03 PM
    Thursday, January 21, 2016 6:59 PM
  • Hi,

    upgradeSummary.wsf has been deleted in MDT 2013 U2. By doing a research of the key in scripts directory, apparently it is MISSING the point where key is set with SUCCESS.

    If it is never set with SUCCESS, it is normal that the Post Processing phase is skipped.  To me, it is a bug. Can anybody confirm? Where can I open bug against MDT?

    Thanks and regards

    Search "Win10UpgradeStatusCode" (2 hits in 2 files)
      C:\Program Files\Microsoft Deployment Toolkit\Templates\Distribution\Scripts\LiteTouch.wsf (1 hit)
    Line 926: sUpgradeFailureCode = oShell.RegRead("HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Windows\Win10UpgradeStatusCode")
      C:\Program Files\Microsoft Deployment Toolkit\Templates\Distribution\Scripts\SetupRollback.cmd (1 hit)
    Line 5: reg add "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Windows" /v Win10UpgradeStatusCode /t REG_SZ /d "Failure" /f

    Monday, January 25, 2016 5:25 PM
  • The connect site.

    Logs are very important. https://keithga.wordpress.com/2014/10/24/video-mdt-2013-log-files-basics-bdd-log-and-smsts-log/ Mention any customizations you have made.

    Monday, January 25, 2016 9:27 PM
    Moderator
  • So is anyone else trying to use the Upgrade task sequence? This seems like the upgrade task sequence is broken until this is fixed.
    Thursday, January 28, 2016 9:34 PM
  • Looking into the logic on the "Options" tab for the "Post-Processing" section of the upgrade task sequence what are thoughts of removing the criteria of the key data being set to SUCCESS or adding an <OR> of the name not existing? Or since there is nothing to set the value to SUCCESS in 2013U2 just changing the criteria to not exist leaving out the check for a value of SUCCESS?

    By changing the criteria to not exist, if the task sequence fails, the value will be set to FAILURE and roll back will run.  By it being set to FAILURE the "not exist" check in Post-Processing will not pass and Post_Processing will not run.  If the setup is successful then the name\value will not be added\set the "not exist" check will pass and Post-Processing will be executed?

    Monday, February 8, 2016 3:52 AM
  • I wanted to post a workaround for this issue that I received from Microsoft Support. Their suggestion was to simply write the missing reg key with the SetupComplete.cmd file.

    The modified version of SetupComplete.cmd is shown below:

    @echo off
    
    for %%d in (c d e f g h i j k l m n o p q r s t u v w x y z) do if exist %%d:\MININT\Scripts\setupcomplete.cmd ( 
    reg add "HKEY_LOCAL_MACHINE\SYSTEM\Setup" /v SetupType /t REG_DWORD /d 2 /f
    reg add "HKEY_LOCAL_MACHINE\SYSTEM\Setup" /v CmdLine /t REG_SZ /d "%%d:\MININT\Scripts\setupcomplete.cmd" /f 
    echo %DATE%-%TIME% Registered Setupcomplete.cmd in registry >> %%d:\MININT\SMSOSD\OSDLOGS\setupcomplete.log)
    
    reg add "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Windows" /v Win10UpgradeStatusCode /t REG_SZ /d "SUCCESS" /f
    
    for %%d in (c d e f g h i j k l m n o p q r s t u v w x y z) do if exist %%d:\MININT\Scripts\LTIBootstrap.vbs (wscript.exe %%d:\MININT\Scripts\LTIBootstrap.vbs ) 
    
    echo %DATE%-%TIME% Successfully upgraded windows, resetting registry >> %WINDIR%\CCM\Logs\setupcomplete.log
    reg add "HKEY_LOCAL_MACHINE\SYSTEM\Setup" /v SetupType /t REG_DWORD /d 0 /f
    reg add "HKEY_LOCAL_MACHINE\SYSTEM\Setup" /v CmdLine /t REG_SZ /d "" /f
    for %%d in (c d e f g h i j k l m n o p q r s t u v w x y z) do if exist %%d:\MININT\Scripts\setupcomplete.cmd ( 
    echo %DATE%-%TIME% Exiting SetupComplete.cmd >> %%d:\MININT\SMSOSD\OSDLOGS\setupcomplete.log)
    


    • Marked as answer by David Bloomer Wednesday, February 10, 2016 7:46 PM
    Tuesday, February 9, 2016 9:59 PM
  • I just tested your work around. Work great. Thanks for your posting.

    thx


    orion


    • Edited by Ultra9.99 Wednesday, February 10, 2016 2:55 AM
    Tuesday, February 9, 2016 11:59 PM
  • Has this issue been addressed yet with a patch to MDT?
    Friday, September 2, 2016 6:03 PM
  • adding: reg add "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Windows" /v Win10UpgradeStatusCode /t REG_SZ /d "SUCCESS" /f
    Works for the post processing.

    But when you use this, the last 2 entries are skipped in the setupcomplete.cmd

    reg add "HKEY_LOCAL_MACHINE\SYSTEM\Setup" /v SetupType /t REG_DWORD /d 0 /f
    reg add "HKEY_LOCAL_MACHINE\SYSTEM\Setup" /v CmdLine /t REG_SZ /d "" /f

    Causing an infinite reboot after the post processing is done, because the added line has done a cleanup already

    Solution for MDT2013

    In the task sequence  add 2 commandlines with the reg add lines who were skipped, before the last reboot in the post processing.

    I am testing it now

    Thursday, February 1, 2018 1:48 PM
  • Tested and working without stock in a reboot

    Also integrated the windows 7 profile of the user and migrated it to a customised W10 profile

    Friday, February 2, 2018 11:56 AM
  • This issue is fixed in MDT 8450, upgrade. 

    / Johan


    Regards / Johan Arwidmark Twitter: @jarwidmark Blog: http://www.deploymentresearch.com FB: www.facebook.com/deploymentresearch

    Friday, February 2, 2018 2:18 PM
    Moderator
  • My workaround was like this:

    I ran my upgrade TS first, deleted the setupcomplete.cmd file from C;\Windows\Setup\Scripts of the upgraded VM

    then I ran a Capture and have not had an issue at all.


    Friday, February 2, 2018 5:41 PM
  • In update in-place process "setupcomplete.cmd" not finish ever. Summary deployment show all ok but not run mouse, use tab keyboard key to "Finish" task sequence.

    I think in this phase stop execution .cmd:

    IF %ERRORLEVEL% EQU -2147021886 (
    echo %DATE%-%TIME% ERRORLEVEL = %ERRORLEVEL%  >> %WINDIR%\setupcomplete.log
    echo %DATE%-%TIME% LiteTouch.wsf requested reboot >> %WINDIR%\setupcomplete.log
    echo %DATE%-%TIME% Rebooting now >> %WINDIR%\setupcomplete.log
    reg add "HKEY_LOCAL_MACHINE\SYSTEM\Setup" /v SetupShutdownRequired /t REG_DWORD /d 1 /f >> %WINDIR%\setupcomplete.log
    ) else (
    echo %DATE%-%TIME% ERRORLEVEL = %ERRORLEVEL%  >> %WINDIR%\setupcomplete.log
    echo %DATE%-%TIME% LiteTouch.wsf did not request reboot, resetting registry >> %WINDIR%\setupcomplete.log
    reg add "HKEY_LOCAL_MACHINE\SYSTEM\Setup" /v SetupType /t REG_DWORD /d 0 /f >> %WINDIR%\setupcomplete.log
    reg add "HKEY_LOCAL_MACHINE\SYSTEM\Setup" /v CmdLine /t REG_SZ /d "" /f >> %WINDIR%\setupcomplete.log
    Set _MDTCleanup=TRUE
    )

    If touch "Finish" complete .cmd, echo instructions and finish all process.

    Monday, March 26, 2018 9:06 AM
  • I am using MDT 8450 but still having this problem with x64 systems only.  The x86 systems are upgrading from Windows 7 Pro to Windows 10 Pro with no issues.

    The Rollback cmd is happening once Windows Updates hit 100%.

    Sunday, August 12, 2018 1:26 AM