none
MDT2013 Update 2 - Invalid DeploymentType=""

    Question

  • I have just upgraded MDT 2013 to Update 2 (skipped Update 1) and tested one of many self contained Media deployment ISO images we have. These use a specific Task Sequence ID which is hidden from the Wizard using "SkipTaskSequence=YES" and "TaskSequenceID=..." in CustomSettings.ini.

    Unlike the previous MDT2013 (non-updated) version, the install now fails to proceed past the "Wizard Ready" stage with the error 'Invalid DeploymentType of "" '.

    The Deployment Type (NEWCOMPUTER) is not set in CustomSettings.ini (never has been), but the logs clearly show it is discovered correctly set (to NEWCOMPUTER) by ZTIGather and LiteTouch; but the Wizard log then reports it as equal to "" at the very end of the Wizard run. Same thing happens if I actually add "DeploymentType=NEWCOMPUTER" to customsettings.ini.

    I reinstated the TaskSequence Wizard page based on a previous posting, selected my Task Sequence in the Wizard at install and voila it worked!

    So what has changed? Why can I no longer skip the TS Wizard page? What is resetting DeploymentType from NEWCOMPUTER to blank? Where should I be looking? Why does an update make things worse?

    Logs available, any and all help appreciated!

    STEVE

    Friday, February 26, 2016 8:05 PM

Answers

  • I began having the same error after updating from MDT 2013 Update 2 to MDT 2013 v8443.

    Unlike it has been suggested, this problem was occurring for me even though I was NOT skipping TS, nor was I skipping PK.

    Yet, I would get the invalid DeploymentType error after clicking "Begin" at the end of the Deployment Wizard.

    After hours of troubleshooting, I was able to locate and resolve the issue by making the following modification to the Scripts\DeployWiz_ProductKeyVista.vbs file.

    Locate Line 51:

    if oProperties("DeploymentType") = "UPGRADE" then

    Change to:

    if Property("DeploymentType") = "UPGRADE" then

    The main deployment wizard script (Wizard.hta) maintains a set of properties in an array called oProperties. This wizard.hta script is the one calling all the DeployWiz_*.vbs scripts as you step through the deployment screens.

    Based on the previous posts in this thread, I suspect that earlier versions of the DeployWiz_SelectTS.vbs script was adding the "DeploymentType" key to oProperties. The new version has removed this. Therefore, in this new version of MDT (v8443) there is no place where a DeploymentType entry is ever added to the oProperties array. And, in the older version if you skipped the selectTS screen, it also would not be added.

    Under these circumstances, if you don't also skip the ProductKey screen then the DeployWiz_ProductKeyVista.vbs script will attempt to read the DeploymentType from oProperties. Because oProperties doesn't contain a DeploymentType property it creates a BLANK one which is subsequently written back out to the main set of environment variables at the end of the wizard.

    For this reason, all the other scripts either call the environment variables directly, or use the provided Property function that is in Wizard.hta. The Property function makes sure that it checks if a property exists in oProperties BEFORE it tries to read it. Thus preventing the creation of blank entries.

    Apparently, Microsoft overlooked this one line of leftover, incompatible code in the DeployWiz_ProductKeyVista.vbs.

    Hopefully they'll fix it soon. But, the fix above should fix it across the board for all recent versions of MDT. The code above is at Line 51 in v8443, but it might be in a slightly different location in older versions.

    • Edited by Appleoddity Friday, December 30, 2016 6:48 AM Added explanation of the bug
    • Proposed as answer by Appleoddity Friday, December 30, 2016 6:54 AM
    • Marked as answer by Steve Atherton Wednesday, January 04, 2017 2:43 PM
    Friday, December 30, 2016 3:30 AM
  • Chaps just saw this on another post

    Just a FYI to everyone concerned about the bug...

    We opened an Premier support case with Microsoft regarding this and they identified it as a bug within the ZTIUtility.vbs script in the \Scripts folder.

    Per the resolution:

    Look for this line: 

    If (oTS.SelectSingleNode("//step[@type='BDD_InstallOS']") is nothing) and (oTS.SelectSingleNode("//step[@type='BDD_UpgradeOS']") is nothing) then

    And change it to:

    If (oTS.SelectSingleNode("//step[@type='BDD_InstallOS' and @disable='false']") is nothing) and (oTS.SelectSingleNode("//step[@type='BDD_UpgradeOS' and @disable='false']") is nothing) then

    We made this modification on the recommendation of the Microsoft Engineer and verified that it correctly displayed the Capture Screen and Computer Details screen of the Deployment Wizard.  We were able to sysprep and capture again as normal afterwards.

    It has allowed me to capture an image, currently going so will see how it gets on, only thing is it didnt show many options in the LiteTouch.vbs screen - my customsettings.ini has nothing in so wasn't skipping them because of that???


    • Edited by EB1983 Thursday, January 26, 2017 4:17 PM
    • Marked as answer by Steve Atherton Thursday, January 26, 2017 6:47 PM
    Thursday, January 26, 2017 4:17 PM

All replies

  • I am not sure why this is failing. Perhaps the work done to handle DeploymentType=Upgrade introduced this. There is some processing that occurs on the select TS page. This is kind of a hunch but, could you try changing your TS's gather step to process rules?

    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.

    Saturday, February 27, 2016 12:27 AM
    Moderator
  • Thanks for your response Ty. Yes it seems that the Select TS page is processing something that must have been processed elsewhere before Update2 (or at least not counter processed!). I changed the Gather steps in both Initialization and Preinstall stages of the TS as you suggested, to "Gather local data and process rules" but got the same error.

    I have published logs at https://onedrive.live.com/redir?resid=D10C9FA7FF7C2F05!111&authkey=!AOKrwVoSVbvhNn8&ithint=folder%2c; there is a folder for no process rules and one for process rules (though I cannot see much difference). The Bootstrap and customsettings.ini are also uploaded. I have no customizations in at this stage save the ones you can see in the custom settings plus a non-default WinPE wallpaper.

    But the logs only seem to show that one minute the Deployment type is correct and the next the Wizard has obliterated the value!

    Grateful for any advice.

    STEVE

    POSTSCRIPT

    Just monitored Variables.Dat during the Wizard process. The DeploymentType is set correctly to NEWCOMPUTER right up to the point where I click the "Begin" on the DeployWiz_Ready page. As soon as I do this, the variable gets set to "" and the error appears. Question is, what runs when I click "Begin"?...

    Monday, February 29, 2016 10:17 AM
  • Hi Steve,

    did you solve that problem in the meantime?

    I've this problem too and could'nt get ist solved.

    Wednesday, August 03, 2016 2:08 PM
  • Hi as_ger

    So in the end I had it raised as an incident with Microsoft. The issue is with the scripts DeployWiz_ProductKeyVista.vbs and DeployWiz_SelectTS.vbs. These include new lines to determine the Windows10/2016 minor version (oUtility.GetMajorMinorVersion(Property("ImageBuild")).

    If you do not skip the Product Key menu (like me) the associated DeployWiz_ProductKeyVista.vbs script needs input from DeployWiz_SelectTS.vbs - which it does not get! If you skip ProductKey and TS it works fine!

    Microsoft have said that they will fix for the next update but I have no date as yet. For now I have just reverted the following two files to those supplied in the original MDT2013 (non update) version:-

    DeployWiz_ProductKeyVista.XML (16/08/2013)

    DeployWiz_ProductKeyVista.vbs (16/08/2013)

    This works fine for my existing builds but I have not been able to test it with a WIndows10/2016 build as yet.

    • Proposed as answer by Achim Schell Thursday, August 04, 2016 6:04 AM
    Wednesday, August 03, 2016 2:36 PM
  • Thank you very much Steve!

    It must be a difference also between online and offline install. Booting with WinPE from the network works fine, but if I deploy the TS with an offline medium (and I need that in my business case) I get the above error.

    I'll try to figure out if your workaround will work for me, too.

    And I hope that Michael will follow this thread and that we'll get a working update quite soon.


    Thursday, August 04, 2016 6:08 AM
  • Microsoft just release another build 8443 (11/14/2016) and it still has the same problem you described here. THANK YOU! for your post, otherwise I would have been rebuilding without any good reason.

    https://blogs.technet.microsoft.com/msdeployment/2016/11/14/microsoft-deployment-toolkit-8443-now-available/


    • Edited by JamesAvery Tuesday, November 15, 2016 3:24 AM added date of build
    Tuesday, November 15, 2016 3:24 AM
  • Oh wow! Do you have a link to the updated build? I cannot find anything other than 8330.

    If I can get that and test and I can maybe re-open my case and ask some serious questions!

    Tuesday, November 15, 2016 9:07 AM
  • https://www.microsoft.com/en-us/download/details.aspx?id=54259

    Tuesday, November 15, 2016 9:05 PM
  • Thanks James. Much appreciated. Will have a look.
    Wednesday, November 16, 2016 12:17 AM
  • I too experienced this same problem. I had fixed it in MDT 2013 Update 2 by following the steps outlined in this post. After updating to the latest version of MDT (build 8443), those customizations were overwritten. I have managed to add the customizations back into the new files and it appears to be working again. See below for the changes...

    Make a backup copy of '.\Scripts\DeployWiz_SelectTS.vbs'. Open the original and look around line 90 for the code below.  

    Function ValidateTSList
    	Dim oTS	

    Add the following three lines after Dim oTS

            Dim oItem
            Dim sCmd
            Set Oshell = createObject("Wscript.shell")

    Now, go down to the end of the script and find the code below:

            End if
    
    End Function


    Place the following code between those two lines:

    sCmd = "wscript.exe """ & oUtility.ScriptDir & "\ZTIGather.wsf""" 
    oItem = oSHell.Run(sCmd, , true)

    I also had to double check my CustomSettings.ini and verify that SkipProductKey=YES was set under my TS ID.

    I hope this information is useful.

    Monday, November 21, 2016 4:30 PM
  • So I downloaded and tested build 8443 and it still has the same issue it would seem. I have notified Microsoft on the back of my original call.
    Monday, November 28, 2016 3:42 PM
  • I tried this dmc1983, but it still does not resolve my issue. My issue was that I actually skip Select_TS in my offline builds (one build; one TS!). I do not skip the Product Key because I want installers to provide it!

    All in all I tried the following combinations:-

    Skip TS - Do not skip PK - ERROR

    Skip TS - Skip PK - NO ERROR

    Do not Skip TS - Do not Skip PK - NO ERROR

    I never got around to testing "Do not skip TS but Skip PK" which is the scenario you describe and for which you have a solution.

    Monday, November 28, 2016 3:55 PM
  • I began having the same error after updating from MDT 2013 Update 2 to MDT 2013 v8443.

    Unlike it has been suggested, this problem was occurring for me even though I was NOT skipping TS, nor was I skipping PK.

    Yet, I would get the invalid DeploymentType error after clicking "Begin" at the end of the Deployment Wizard.

    After hours of troubleshooting, I was able to locate and resolve the issue by making the following modification to the Scripts\DeployWiz_ProductKeyVista.vbs file.

    Locate Line 51:

    if oProperties("DeploymentType") = "UPGRADE" then

    Change to:

    if Property("DeploymentType") = "UPGRADE" then

    The main deployment wizard script (Wizard.hta) maintains a set of properties in an array called oProperties. This wizard.hta script is the one calling all the DeployWiz_*.vbs scripts as you step through the deployment screens.

    Based on the previous posts in this thread, I suspect that earlier versions of the DeployWiz_SelectTS.vbs script was adding the "DeploymentType" key to oProperties. The new version has removed this. Therefore, in this new version of MDT (v8443) there is no place where a DeploymentType entry is ever added to the oProperties array. And, in the older version if you skipped the selectTS screen, it also would not be added.

    Under these circumstances, if you don't also skip the ProductKey screen then the DeployWiz_ProductKeyVista.vbs script will attempt to read the DeploymentType from oProperties. Because oProperties doesn't contain a DeploymentType property it creates a BLANK one which is subsequently written back out to the main set of environment variables at the end of the wizard.

    For this reason, all the other scripts either call the environment variables directly, or use the provided Property function that is in Wizard.hta. The Property function makes sure that it checks if a property exists in oProperties BEFORE it tries to read it. Thus preventing the creation of blank entries.

    Apparently, Microsoft overlooked this one line of leftover, incompatible code in the DeployWiz_ProductKeyVista.vbs.

    Hopefully they'll fix it soon. But, the fix above should fix it across the board for all recent versions of MDT. The code above is at Line 51 in v8443, but it might be in a slightly different location in older versions.

    • Edited by Appleoddity Friday, December 30, 2016 6:48 AM Added explanation of the bug
    • Proposed as answer by Appleoddity Friday, December 30, 2016 6:54 AM
    • Marked as answer by Steve Atherton Wednesday, January 04, 2017 2:43 PM
    Friday, December 30, 2016 3:30 AM
  • I also had to double check my CustomSettings.ini and verify that SkipProductKey=YES was set under my TS ID.

    Adding the SkipProductKey=YES is actually what solved the problem in this thread. The other changes to the DeployWiz_SelectTS are not needed.

    In reality, the changes you proposed look like the instructions found here to use custom settings per TaskSequenceID: https://the-d-spot.org/2012/07/20/how-to-use-different-settings-per-task-sequence-with-mdt-2012/

    Based on your comment, "was set under my TS ID" seems to confirm that you are using the above method to use custom settings per TaskSequenceID. Others could just add the SkipProductKey=YES to the default section to achieve the same results.

    Just wanted to clarify that.


    • Edited by Appleoddity Friday, December 30, 2016 7:03 AM
    Friday, December 30, 2016 7:02 AM
  • Congratulations Appleoddity! Yes that did indeed resolve the issue (in 8443 anyway - won't bother to test the rest!).

    I would never have thought to look at this piece of code seeing as I was not doing an Upgrade, but there you have it! I will also go back to my call with Microsoft and point them at this as the fix. All hail the partner network doing the job for THEM.

    STEVE

    Wednesday, January 04, 2017 2:46 PM
  • Thanks for the positive feedback! It makes me feel good that my entire day of reverse engineering their code wasn't a waste. :) (Ofcourse, I needed it to work on my end too)

    Wednesday, January 04, 2017 2:50 PM
  • Hi Appleoddity,

    I've been messing around with this all day and can't find a solid solution. I'm trying to run the Sysprep & Capture Sequence (Standard with no modifications). I want to skip all of the panes except for the Capture Pane. The only way I can get the capture pane to appear is if I also have the SkipProductKey=No in the customsettings.ini. Just like to confirm that I don't need to make the changes to the ProductKeyVista.vbs as you said in your previous comment?

    [Settings]
    Priority=Default
    Properties=MyCustomProperty

    [Default]
    SkipCapture=NO
    DoCapture=Yes
    SkipComputerName=Yes
    SkipComputerBackup=Yes
    SkipDomainMembership=Yes
    SkipProductKey=No
    SkipTaskSequence=Yes
    SkipTimeZone=Yes
    SkipLocaleSelection=Yes
    SkipAdminPassword=Yes

    If I Skip the ProductKey it doesn't go to the Capture Window, When I don't skip it I can set the capture settings but then I get the invalid DeploymentType = "" when I click begin. Running 8443.

    Any Ideas?

    Wednesday, January 25, 2017 3:35 PM
  • Hi Chris. I don't usually do captures using MDT, so I'm not familiar with the process. I could do some testing over the next few days and see if I could help, or I'm sure one of the fine people on this forum might be able to help. In regards to not getting the capture window to show, I would suggest starting a new thread. 

    However, with your current CustomSettings.ini, regardless if you are using MDT Update 2 or MDT v8443 you will need to make the changes described in my previous post. If you manage to get the SkipProductKey=Yes to work in your scenario, then you would NOT need to make the changes I described.

    The problem in this thread only occurs when the product key window is shown and your issue of not being able to get the capture window to show, is not related.

    Good luck!

    Wednesday, January 25, 2017 3:59 PM
  • Oh no, more grief! Good spot Chris!

    Capture was working fine for me under Update2 (build 8330) hence it never appeared in this thread.

    But I have just checked your issue on my Build 8443 and have found the issue you describe.

    In fact I cannot get the Capture screen (DeployWiz_CaptureImage) to show at all, whether I skip the Product Key or not - although MY ProductKeyVista.vbs IS edited as per Appleoddity's post. So something else is greatly amiss for Capture. Although it does not give the "DeploymentType = """ error!

    It does not actually do any sysprep or capture either!

    I operate different Deployment Shares for Deploy and Capture so I suppose my work around will be using the 8330 script file or files(?) but we will see. In the meantime I will try and spare some time to investigate.

    Wednesday, January 25, 2017 5:10 PM
  • I have just installed the latest MDT and I'm having similar issues:

    If I set SkipProdutKey=YES in customsettings.ini - the 'Capture' page doesnt not appear when running 'LiteTouch.vbs'

    If I remove it, I see the capture page, but when the task runs it immediately fails - Invalid Deploymnet Type value "" specified.

    I have tried editing  DeployWiz_ProductKeyVista.vbs removing the o from oproperties but I get an error while running LIteTouch.vbs at the Product Key page.


    Anyone else got any ideas? Im a bit stuck now???

    Thanks

    Thursday, January 26, 2017 3:47 PM
  • Chaps just saw this on another post

    Just a FYI to everyone concerned about the bug...

    We opened an Premier support case with Microsoft regarding this and they identified it as a bug within the ZTIUtility.vbs script in the \Scripts folder.

    Per the resolution:

    Look for this line: 

    If (oTS.SelectSingleNode("//step[@type='BDD_InstallOS']") is nothing) and (oTS.SelectSingleNode("//step[@type='BDD_UpgradeOS']") is nothing) then

    And change it to:

    If (oTS.SelectSingleNode("//step[@type='BDD_InstallOS' and @disable='false']") is nothing) and (oTS.SelectSingleNode("//step[@type='BDD_UpgradeOS' and @disable='false']") is nothing) then

    We made this modification on the recommendation of the Microsoft Engineer and verified that it correctly displayed the Capture Screen and Computer Details screen of the Deployment Wizard.  We were able to sysprep and capture again as normal afterwards.

    It has allowed me to capture an image, currently going so will see how it gets on, only thing is it didnt show many options in the LiteTouch.vbs screen - my customsettings.ini has nothing in so wasn't skipping them because of that???


    • Edited by EB1983 Thursday, January 26, 2017 4:17 PM
    • Marked as answer by Steve Atherton Thursday, January 26, 2017 6:47 PM
    Thursday, January 26, 2017 4:17 PM
  • Yep! That would appear to work!

    Thursday, January 26, 2017 6:47 PM
  • Chaps just saw this on another post

    Just a FYI to everyone concerned about the bug...

    We opened an Premier support case with Microsoft regarding this and they identified it as a bug within the ZTIUtility.vbs script in the \Scripts folder.

    Per the resolution:

    Look for this line: 

    If (oTS.SelectSingleNode("//step[@type='BDD_InstallOS']") is nothing) and (oTS.SelectSingleNode("//step[@type='BDD_UpgradeOS']") is nothing) then

    And change it to:

    If (oTS.SelectSingleNode("//step[@type='BDD_InstallOS' and @disable='false']") is nothing) and (oTS.SelectSingleNode("//step[@type='BDD_UpgradeOS' and @disable='false']") is nothing) then

    We made this modification on the recommendation of the Microsoft Engineer and verified that it correctly displayed the Capture Screen and Computer Details screen of the Deployment Wizard.  We were able to sysprep and capture again as normal afterwards.

    It has allowed me to capture an image, currently going so will see how it gets on, only thing is it didnt show many options in the LiteTouch.vbs screen - my customsettings.ini has nothing in so wasn't skipping them because of that???



    This solved the problem for me. All Deployment Panes are displaying as expected and I've successfully captured a new Windows 10 1607 Reference Image. Using MDT 8443.
    Monday, January 30, 2017 9:42 AM
  • I began having the same error after updating from MDT 2013 Update 2 to MDT 2013 v8443.

    Unlike it has been suggested, this problem was occurring for me even though I was NOT skipping TS, nor was I skipping PK.

    Yet, I would get the invalid DeploymentType error after clicking "Begin" at the end of the Deployment Wizard.

    After hours of troubleshooting, I was able to locate and resolve the issue by making the following modification to the Scripts\DeployWiz_ProductKeyVista.vbs file.

    Locate Line 51:

    if oProperties("DeploymentType") = "UPGRADE" then

    Change to:

    if Property("DeploymentType") = "UPGRADE" then

    The main deployment wizard script (Wizard.hta) maintains a set of properties in an array called oProperties. This wizard.hta script is the one calling all the DeployWiz_*.vbs scripts as you step through the deployment screens.

    Based on the previous posts in this thread, I suspect that earlier versions of the DeployWiz_SelectTS.vbs script was adding the "DeploymentType" key to oProperties. The new version has removed this. Therefore, in this new version of MDT (v8443) there is no place where a DeploymentType entry is ever added to the oProperties array. And, in the older version if you skipped the selectTS screen, it also would not be added.

    Under these circumstances, if you don't also skip the ProductKey screen then the DeployWiz_ProductKeyVista.vbs script will attempt to read the DeploymentType from oProperties. Because oProperties doesn't contain a DeploymentType property it creates a BLANK one which is subsequently written back out to the main set of environment variables at the end of the wizard.

    For this reason, all the other scripts either call the environment variables directly, or use the provided Property function that is in Wizard.hta. The Property function makes sure that it checks if a property exists in oProperties BEFORE it tries to read it. Thus preventing the creation of blank entries.

    Apparently, Microsoft overlooked this one line of leftover, incompatible code in the DeployWiz_ProductKeyVista.vbs.

    Hopefully they'll fix it soon. But, the fix above should fix it across the board for all recent versions of MDT. The code above is at Line 51 in v8443, but it might be in a slightly different location in older versions.

    Same context here, after the upgrade I could no longer run my task sequence.  Learning MDT here, that saved me a lot of time :-)  

    Frank B-T

    Thursday, February 16, 2017 12:02 AM
  • Thank you this worked for me.
    Tuesday, February 28, 2017 4:56 PM
  • This solution worked for me as well.
    Monday, June 05, 2017 3:50 PM

  • I have tried editing  DeployWiz_ProductKeyVista.vbs removing the o from oproperties but I get an error while running LIteTouch.vbs at the Product Key page.


    Just make sure you are editing the file exactly the way I have described. Removing the 'o' is not the exact instructions. This is why you are getting an error on the Product Key page now.

    We should all be clear - there are TWO problems listed in this thread. One about invalid deployment type, and one about the missing capture page.  Two different problems, two different solutions.

    Both, appear to be resolved by the useful information the community has posted. Thanks to all!

    Monday, June 05, 2017 4:14 PM
  • Hi Everyone,

    Actually i've again the same problem ' Invalid DeploymentType="" ', when i try to make an capture of Server 2016.

    My MDT server configuration is the following:  Server 2016 up to date + MDT 6.3.8443.1000 + ADK 10.1.15063.0.

    I've tried some cases :

    • 1 - OEM files in script folder, product key not skipped, set with KMS Public Key or empty ;
    • 2 - OEM files in script folder, product key skipped in customsettings / bootstrap, no capture prompt options ;
    • 3 - With modification of the only file "DeployWiz_ProductKeyVista.vbs" explained on this thread, with product key / without product key, same issue, no capture prompt options like the point 2 ;
    • 4 - With modification of the only file "DeployWiz_SelectTS", same error like the point 1 ;
    • 5 - With modification of the only file "ZTIUtility", no capture prompt options ;

    I resolve this problem, with theses customsetting / bootstrap options:

    [00:00:00:00:00:00] <--- Enter the real MAC 
    SkipTaskSequence=YES
    TaskSequenceID=CAPTURE2016
    _SMSTSORGNAME=Creation de l'image de reference - %TaskSequenceID%
    DOCapture=YES
    SkipCapture=NO
    SkipProductKey=YES
    JoinWorkgroup=WORKGROUP
    ComputerBackupLocation=\\0.0.0.0\deploymentshare$\Captures <--Enter the real IP
    BackupFile=Fichier.WIM

    With this tips, i haven't capture prompt but it works.

    All the scripts files are untouched, and i can capture my 2016 :-)

    • Proposed as answer by Antoine M76 Wednesday, July 05, 2017 1:14 PM
    Wednesday, July 05, 2017 12:45 PM