none
MDT 2012 - Settings Per Task Sequence

Answers

  • Same scenario for me, I need rules processed again after a task sequence is chosen. The problem I am running into is that the DeployWiz_Validation.vbs files is empty. Sooo where do I place this now?

    Figured it out, almost the same as 2010 but for 2012:

    1. Edit DeployWiz_SelectTS.vbs

    2. Add after "Dim sTemplate"

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

    3. Add before "End Function" (bottom of page)

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

    Reference:http://social.technet.microsoft.com/Forums/is/mdt/thread/84831d92-b69a-493b-8dc8-3e0efb419242

    Monday, April 23, 2012 6:49 PM
  • I am having the same problem that Milak stated above with the Deploywiz_Validation.vbs script being empty. This is literally what it has in it.

    ' // ***************************************************************************
    ' // 
    ' // Copyright (c) Microsoft Corporation.  All rights reserved.
    ' // 
    ' // Microsoft Deployment Toolkit Solution Accelerator
    ' //
    ' // File:      DeployWiz_Validation.vbs
    ' // 
    ' // Version:   6.0.2223.0
    ' // 
    ' // Purpose:   Main Client Deployment Wizard Validation routines
    ' // 
    ' // ***************************************************************************
    
    Option Explicit
    
    

    That's it! Nothing more! So how can I perform the above fix unless I copy the old file from my working MDT 2010 Update 1 server, in which case, why was this file even updated then?

    I did follow another users post on this link that suggested to do the following:

     ".....modify the script "DeplyWiz_SelectTS.vbs" 

    near the line 156 (after the line  Dim sTemplate) add :

    Dim sCmd

    Set Oshell = createObject("Wscript.shell")

    near the line 230 (after the line OLogging.CreateEntry "DeploymentType" .....) add :

    sCmd = "wscript.exe """ & oUtility.ScriptDir & "\ZTIGather.wsf"""

    oItem = oSHell.Run(sCmd, , true)"

    THIS WORKED!!!!! Although there may be some differences between the Beta release and the official release because the line numbers aren't right. It should read like this:

     ".....modify the script "DeplyWiz_SelectTS.vbs" 

    near the line 99 (after the line  Dim sTemplate) add :

    Dim sCmd

    Set Oshell = createObject("Wscript.shell")

    near the line 165 (after the line OLogging.CreateEntry "DeploymentType" .....) add :

    sCmd = "wscript.exe """ & oUtility.ScriptDir & "\ZTIGather.wsf"""

    oItem = oSHell.Run(sCmd, , true)"

    Again we have to modify scripts to get the product to work. But, from what I've seen in testing with the new version, a little headache is probably worth it (assuming I don't run into any more trouble).

    I hope this helps others.

    Mike

    Monday, June 4, 2012 9:48 PM
  • DeployWiz_SelectTS.vbs

    ' // ***************************************************************************
    ' //
    ' // Copyright (c) Microsoft Corporation.  All rights reserved.
    ' //
    ' // Microsoft Deployment Toolkit Solution Accelerator
    ' //
    ' // File:      DeployWiz_Initialization.vbs
    ' //
    ' // Version:   6.0.2223.0
    ' //
    ' // Purpose:   Main Client Deployment Wizard Initialization routines
    ' //
    ' // ***************************************************************************


    Option Explicit


    '''''''''''''''''''''''''''''''''''''
    '  Image List
    '

    Dim g_AllOperatingSystems

    Function AllOperatingSystems


        Dim oOSes

        If isempty(g_AllOperatingSystems) then
        
            set oOSes = new ConfigFile
            oOSes.sFileType = "OperatingSystems"
            oOSes.bMustSucceed = false
            
            set g_AllOperatingSystems = oOSes.FindAllItems
            
        End if

        set AllOperatingSystems = g_AllOperatingSystems

    End function


    Function InitializeTSList
        Dim oItem, sXPathOld
        
        If oEnvironment.Item("TaskSequenceID") <> "" and oProperties("TSGuid") = "" then
            
            sXPathOld = oTaskSequences.xPathFilter
            for each oItem in oTaskSequences.oControlFile.SelectNodes( "/*/*[ID = '" & oEnvironment.Item("TaskSequenceID")&"']")
                oLogging.CreateEntry "TSGuid changed via TaskSequenceID = " & oEnvironment.Item("TaskSequenceID"), LogTypeInfo
                oEnvironment.Item("TSGuid") = oItem.Attributes.getNamedItem("guid").value
                exit for
            next
            
            oTaskSequences.xPathFilter = sXPathOld
            
        End if

        TSListBox.InnerHTML = oTaskSequences.GetHTMLEx ( "Radio", "TSGuid" )
        
        PopulateElements
        TSItemChange

    End function


    Function TSItemChange

        Dim oInput
        ButtonNext.Disabled = TRUE
        
        for each oInput in document.getElementsByName("TSGuid")
            If oInput.Checked then
                oLogging.CreateEntry "Found CHecked Item: " & oInput.Value, LogTypeVerbose
            
                ButtonNext.Disabled = FALSE
                exit function
            End if
        next

    End function


    '''''''''''''''''''''''''''''''''''''
    '  Validate task sequence List
    '

    Function ValidateTSList

        Dim oTaskList
        Dim oTS
        Dim oItem
        Dim oOSItem
        Dim sID
        Dim bFound
        Dim sTemplate
        Dim sCmd
        
        Set Oshell = createObject("Wscript.shell")
        

        
        set oTS = new ConfigFile
        oTS.sFileType = "TaskSequences"

        SaveAllDataElements

        If Property("TSGuid") = "" then
            oLogging.CreateEntry "No valid TSGuid found in the environment.", LogTypeWarning
            ValidateTSList = false
        End if

        oLogging.CreateEntry "TSGuid Found: " & Property("TSGuid"), LogTypeVerbose
        
        sID = ""
        sTemplate = ""
        If oTS.FindAllItems.Exists(Property("TSGuid")) then
            sID = oUtility.SelectSingleNodeString(oTS.FindAllItems.Item(Property("TSGuid")),"./ID")
            sTemplate = oUtility.SelectSingleNodeString(oTS.FindAllItems.Item(Property("TSGuid")),"./TaskSequenceTemplate")
        End if
        
        oEnvironment.item("TaskSequenceID") = sID
        TestAndLog sID <> "", "Verify Task Sequence ID: " & sID
        Set oTaskList = oUtility.LoadConfigFileSafe( sID & "\TS.XML" )

        If not FindTaskSequenceStep( "//step[@type='BDD_InstallOS']", "" ) then

            oLogging.CreateEntry "Task Sequence does not contain an OS and does not contain a LTIApply.wsf step, possibly a Custom Step or a Client Replace.", LogTypeInfo
            
            oProperties.Item("OSGUID")=""
            If not (oTaskList.SelectSingleNode("//group[@name='State Restore']") is nothing) then
                oProperties("DeploymentType") = "StateRestore"
            ElseIf sTemplate <> "ClientReplace.xml" and oTaskList.SelectSingleNode("//step[@name='Capture User State']") is nothing then
                oProperties("DeploymentType")="CUSTOM"
            Else
                oProperties("DeploymentType")="REPLACE"

                RMPropIfFound("ImageIndex")
                RMPropIfFound("ImageSize")
                RMPRopIfFound("ImageFlags")
                RMPropIfFound("ImageBuild")
                RMPropIfFound("InstallFromPath")
                RMPropIfFound("ImageMemory")

                oEnvironment.Item("ImageProcessor")=Ucase(oEnvironment.Item("Architecture"))
            End if

        Elseif oEnvironment.Item("OSVERSION")="WinPE" Then

            oProperties("DeploymentType")="NEWCOMPUTER"

        Else

            oLogging.CreateEntry "Task Sequence contains a LTIApply.wsf step, and is not running within WinPE.", LogTypeInfo
            oProperties("DeploymentType") = "REFRESH"
            oEnvironment.Item("DeployTemplate")=Ucase(Left(sTemplate,Instr(sTemplate,".")-1))

        End if

        oLogging.CreateEntry "DeploymentType = " & oProperties("DeploymentType"), LogTypeInfo

        
        set oTaskList = nothing
        set oTS = nothing


        ' Set the related properties

        oEnvironment.Item("ImageProcessor") = ""
        oEnvironment.Item("OSGUID")=""
        oUtility.SetTaskSequenceProperties sID


        If Left(Property("ImageBuild"), 1) < "6" then
            RMPropIfFound("LanguagePacks")
            RMPropIfFound("UserLocaleAndLang")
            RMPropIfFound("KeyboardLocale")
            RMPropIfFound("UserLocale")
            RMPropIfFound("UILanguage")
            RMPropIfFound("BdePin")
            RMPropIfFound("BdeModeSelect1")
            RMPropIfFound("BdeModeSelect2")
            RMPropIfFound("OSDBitLockerStartupKeyDrive")
            RMPropIfFound("WaitForEncryption")
            RMPropIfFound("BdeInstall")
            RMPropIfFound("OSDBitLockerWaitForEncryption")
            RMPropIfFound("BdeRecoveryKey")
            RMPropIfFound("BdeInstallSuppress")
        End If

        If oEnvironment.Item("OSGUID") <> "" and oEnvironment.Item("ImageProcessor") = "" then
            ' There was an OSGUID defined within the TS.xml file, however the GUID was not found
            ' within the OperatingSystems.xml file. Which is a dependency error. Block the wizard.
            ValidateTSList = False
            ButtonNext.Disabled = True
            Bad_OSGUID.style.display = "inline"
        Else
            ValidateTSList = True
            ButtonNext.Disabled = False
            Bad_OSGUID.style.display = "none"
        ENd if

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

    End Function

    Friday, August 10, 2012 5:10 PM

All replies

  • I actually managed to walk into a resolution on a fix for the MDT 2010 side of it. It was posted by Biziee in this topic (http://social.technet.microsoft.com/Forums/en-US/mdt/thread/fa1235a7-3b09-4291-b2e8-1058fbfa90ae). The fix for 2012 is the following (along with the original article posted by Johan that I linked in the beginning):

    CREATE A BACKUP OF Deploymentshare\Scripts\DeployWiz_Validation.vbs

    1. Open Deploymentshare\Scripts\DeployWiz_Validation.vbs in a text editor.
    2. Scroll down to the Validate task sequence List function (ValidateTSList).
    3. Add the following below Dim sTemplate:
      Dim sCmd
    4. Below the line
       oLogging.CreateEntry "DeploymentType = " & oProperties("DeploymentType"), LogTypeInfo 

      add

      	sCmd = "wscript.exe """ & oUtility.ScriptDir & "\ZTIGather.wsf"""
      	oItem = oSHell.Run(sCmd, , true)
    5. Save the modified DeployWiz_Validation.vbs
    • Marked as answer by Joe Cutter Thursday, April 19, 2012 8:58 PM
    • Unmarked as answer by Joe Cutter Thursday, October 4, 2012 7:09 PM
    Thursday, April 19, 2012 8:58 PM
  • Same scenario for me, I need rules processed again after a task sequence is chosen. The problem I am running into is that the DeployWiz_Validation.vbs files is empty. Sooo where do I place this now?
    • Proposed as answer by Milak Monday, April 23, 2012 6:43 PM
    • Unproposed as answer by Milak Monday, April 23, 2012 6:43 PM
    Monday, April 23, 2012 4:37 PM
  • Same scenario for me, I need rules processed again after a task sequence is chosen. The problem I am running into is that the DeployWiz_Validation.vbs files is empty. Sooo where do I place this now?

    Figured it out, almost the same as 2010 but for 2012:

    1. Edit DeployWiz_SelectTS.vbs

    2. Add after "Dim sTemplate"

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

    3. Add before "End Function" (bottom of page)

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

    Reference:http://social.technet.microsoft.com/Forums/is/mdt/thread/84831d92-b69a-493b-8dc8-3e0efb419242

    Monday, April 23, 2012 6:49 PM
  • Great, I was just looking for that :-)
    Thursday, May 3, 2012 10:40 AM
  • I am having the same problem that Milak stated above with the Deploywiz_Validation.vbs script being empty. This is literally what it has in it.

    ' // ***************************************************************************
    ' // 
    ' // Copyright (c) Microsoft Corporation.  All rights reserved.
    ' // 
    ' // Microsoft Deployment Toolkit Solution Accelerator
    ' //
    ' // File:      DeployWiz_Validation.vbs
    ' // 
    ' // Version:   6.0.2223.0
    ' // 
    ' // Purpose:   Main Client Deployment Wizard Validation routines
    ' // 
    ' // ***************************************************************************
    
    Option Explicit
    
    

    That's it! Nothing more! So how can I perform the above fix unless I copy the old file from my working MDT 2010 Update 1 server, in which case, why was this file even updated then?

    I did follow another users post on this link that suggested to do the following:

     ".....modify the script "DeplyWiz_SelectTS.vbs" 

    near the line 156 (after the line  Dim sTemplate) add :

    Dim sCmd

    Set Oshell = createObject("Wscript.shell")

    near the line 230 (after the line OLogging.CreateEntry "DeploymentType" .....) add :

    sCmd = "wscript.exe """ & oUtility.ScriptDir & "\ZTIGather.wsf"""

    oItem = oSHell.Run(sCmd, , true)"

    THIS WORKED!!!!! Although there may be some differences between the Beta release and the official release because the line numbers aren't right. It should read like this:

     ".....modify the script "DeplyWiz_SelectTS.vbs" 

    near the line 99 (after the line  Dim sTemplate) add :

    Dim sCmd

    Set Oshell = createObject("Wscript.shell")

    near the line 165 (after the line OLogging.CreateEntry "DeploymentType" .....) add :

    sCmd = "wscript.exe """ & oUtility.ScriptDir & "\ZTIGather.wsf"""

    oItem = oSHell.Run(sCmd, , true)"

    Again we have to modify scripts to get the product to work. But, from what I've seen in testing with the new version, a little headache is probably worth it (assuming I don't run into any more trouble).

    I hope this helps others.

    Mike

    Monday, June 4, 2012 9:48 PM
  • Agreed, we shouldn't have to modify these files to get this functionality. This type of fix has been around since 2010 as far as I know and regardless of how MS feels it's should be done, this is functionality that some of us need.

    I purposely left line numbers out of my fix, which I am still using today without issue. The only caveat is that because the rules run multiple times it takes little longer to get to the task sequence page. Also the time it takes for the rules to run after choosing the task sequence can be up to 30 seconds in my environment and I have not setup anything in the wizard to indicate the rule are currently processing. Although it's fairly easy to modify the wizard pages text.

    Tuesday, June 5, 2012 6:23 PM
  • This solved my issues with MDT 2012, thanks!
    Wednesday, June 20, 2012 6:31 AM
  • I cannot believe this is still an issue on MDT 2012!

    We went through this with 2010 and have just had to do it again, and with the nice 30 second wait for it to rerun the gather.  Can someone explain to me why the rules are run before selecting the TS and not after?!

    Actually, i guess if you were doing zerotouch with skipTaskSequence=Yes then you'd need to have already run the rules to find that out.  Humph.


    Andy Paterson, IT Advisor, University of Wales Institute Cardiff

    Wednesday, June 20, 2012 11:55 AM
  • This seems to be working for me, but only if I have nothing specified in the [Default] section in CS.ini.  So, I have to create a section in the CS.ini for each Task Sequence.
    Wednesday, June 27, 2012 1:44 PM
  • Can someone please post the contents of the DeployWiz_Validation.vbs
    script? My script is blank and I dont have a copy of it. Need to get
    this working. Thank you very much!
    Friday, August 10, 2012 3:21 PM
  • Tried this and it didnt work for me. thanks

    Friday, August 10, 2012 3:31 PM
  • Can someone please post the contents of the DeployWiz_Validation.vbs
    script? My script is blank and I dont have a copy of it. Need to get
    this working. Thank you very much!
    ' // ***************************************************************************
    ' // 
    ' // Copyright (c) Microsoft Corporation.  All rights reserved.
    ' // 
    ' // Microsoft Deployment Toolkit Solution Accelerator
    ' //
    ' // File:      DeployWiz_Validation.vbs
    ' // 
    ' // Version:   6.0.2223.0
    ' // 
    ' // Purpose:   Main Client Deployment Wizard Validation routines
    ' // 
    ' // ***************************************************************************
    
    Option Explicit
    

    This is what I have in mine.
    Friday, August 10, 2012 3:31 PM
  • Please see my answer from April 23rd, this is the only fix I am aware of for MDT 2012. The accepted answer to this thread relates to MDT 2010 not 2012. I am still using my fix without issue.
    Friday, August 10, 2012 3:45 PM
  • Thats blank too. thx
    Friday, August 10, 2012 4:01 PM
  • DeployWiz_SelectTS.vbs

    ' // ***************************************************************************
    ' //
    ' // Copyright (c) Microsoft Corporation.  All rights reserved.
    ' //
    ' // Microsoft Deployment Toolkit Solution Accelerator
    ' //
    ' // File:      DeployWiz_Initialization.vbs
    ' //
    ' // Version:   6.0.2223.0
    ' //
    ' // Purpose:   Main Client Deployment Wizard Initialization routines
    ' //
    ' // ***************************************************************************


    Option Explicit


    '''''''''''''''''''''''''''''''''''''
    '  Image List
    '

    Dim g_AllOperatingSystems

    Function AllOperatingSystems


        Dim oOSes

        If isempty(g_AllOperatingSystems) then
        
            set oOSes = new ConfigFile
            oOSes.sFileType = "OperatingSystems"
            oOSes.bMustSucceed = false
            
            set g_AllOperatingSystems = oOSes.FindAllItems
            
        End if

        set AllOperatingSystems = g_AllOperatingSystems

    End function


    Function InitializeTSList
        Dim oItem, sXPathOld
        
        If oEnvironment.Item("TaskSequenceID") <> "" and oProperties("TSGuid") = "" then
            
            sXPathOld = oTaskSequences.xPathFilter
            for each oItem in oTaskSequences.oControlFile.SelectNodes( "/*/*[ID = '" & oEnvironment.Item("TaskSequenceID")&"']")
                oLogging.CreateEntry "TSGuid changed via TaskSequenceID = " & oEnvironment.Item("TaskSequenceID"), LogTypeInfo
                oEnvironment.Item("TSGuid") = oItem.Attributes.getNamedItem("guid").value
                exit for
            next
            
            oTaskSequences.xPathFilter = sXPathOld
            
        End if

        TSListBox.InnerHTML = oTaskSequences.GetHTMLEx ( "Radio", "TSGuid" )
        
        PopulateElements
        TSItemChange

    End function


    Function TSItemChange

        Dim oInput
        ButtonNext.Disabled = TRUE
        
        for each oInput in document.getElementsByName("TSGuid")
            If oInput.Checked then
                oLogging.CreateEntry "Found CHecked Item: " & oInput.Value, LogTypeVerbose
            
                ButtonNext.Disabled = FALSE
                exit function
            End if
        next

    End function


    '''''''''''''''''''''''''''''''''''''
    '  Validate task sequence List
    '

    Function ValidateTSList

        Dim oTaskList
        Dim oTS
        Dim oItem
        Dim oOSItem
        Dim sID
        Dim bFound
        Dim sTemplate
        Dim sCmd
        
        Set Oshell = createObject("Wscript.shell")
        

        
        set oTS = new ConfigFile
        oTS.sFileType = "TaskSequences"

        SaveAllDataElements

        If Property("TSGuid") = "" then
            oLogging.CreateEntry "No valid TSGuid found in the environment.", LogTypeWarning
            ValidateTSList = false
        End if

        oLogging.CreateEntry "TSGuid Found: " & Property("TSGuid"), LogTypeVerbose
        
        sID = ""
        sTemplate = ""
        If oTS.FindAllItems.Exists(Property("TSGuid")) then
            sID = oUtility.SelectSingleNodeString(oTS.FindAllItems.Item(Property("TSGuid")),"./ID")
            sTemplate = oUtility.SelectSingleNodeString(oTS.FindAllItems.Item(Property("TSGuid")),"./TaskSequenceTemplate")
        End if
        
        oEnvironment.item("TaskSequenceID") = sID
        TestAndLog sID <> "", "Verify Task Sequence ID: " & sID
        Set oTaskList = oUtility.LoadConfigFileSafe( sID & "\TS.XML" )

        If not FindTaskSequenceStep( "//step[@type='BDD_InstallOS']", "" ) then

            oLogging.CreateEntry "Task Sequence does not contain an OS and does not contain a LTIApply.wsf step, possibly a Custom Step or a Client Replace.", LogTypeInfo
            
            oProperties.Item("OSGUID")=""
            If not (oTaskList.SelectSingleNode("//group[@name='State Restore']") is nothing) then
                oProperties("DeploymentType") = "StateRestore"
            ElseIf sTemplate <> "ClientReplace.xml" and oTaskList.SelectSingleNode("//step[@name='Capture User State']") is nothing then
                oProperties("DeploymentType")="CUSTOM"
            Else
                oProperties("DeploymentType")="REPLACE"

                RMPropIfFound("ImageIndex")
                RMPropIfFound("ImageSize")
                RMPRopIfFound("ImageFlags")
                RMPropIfFound("ImageBuild")
                RMPropIfFound("InstallFromPath")
                RMPropIfFound("ImageMemory")

                oEnvironment.Item("ImageProcessor")=Ucase(oEnvironment.Item("Architecture"))
            End if

        Elseif oEnvironment.Item("OSVERSION")="WinPE" Then

            oProperties("DeploymentType")="NEWCOMPUTER"

        Else

            oLogging.CreateEntry "Task Sequence contains a LTIApply.wsf step, and is not running within WinPE.", LogTypeInfo
            oProperties("DeploymentType") = "REFRESH"
            oEnvironment.Item("DeployTemplate")=Ucase(Left(sTemplate,Instr(sTemplate,".")-1))

        End if

        oLogging.CreateEntry "DeploymentType = " & oProperties("DeploymentType"), LogTypeInfo

        
        set oTaskList = nothing
        set oTS = nothing


        ' Set the related properties

        oEnvironment.Item("ImageProcessor") = ""
        oEnvironment.Item("OSGUID")=""
        oUtility.SetTaskSequenceProperties sID


        If Left(Property("ImageBuild"), 1) < "6" then
            RMPropIfFound("LanguagePacks")
            RMPropIfFound("UserLocaleAndLang")
            RMPropIfFound("KeyboardLocale")
            RMPropIfFound("UserLocale")
            RMPropIfFound("UILanguage")
            RMPropIfFound("BdePin")
            RMPropIfFound("BdeModeSelect1")
            RMPropIfFound("BdeModeSelect2")
            RMPropIfFound("OSDBitLockerStartupKeyDrive")
            RMPropIfFound("WaitForEncryption")
            RMPropIfFound("BdeInstall")
            RMPropIfFound("OSDBitLockerWaitForEncryption")
            RMPropIfFound("BdeRecoveryKey")
            RMPropIfFound("BdeInstallSuppress")
        End If

        If oEnvironment.Item("OSGUID") <> "" and oEnvironment.Item("ImageProcessor") = "" then
            ' There was an OSGUID defined within the TS.xml file, however the GUID was not found
            ' within the OperatingSystems.xml file. Which is a dependency error. Block the wizard.
            ValidateTSList = False
            ButtonNext.Disabled = True
            Bad_OSGUID.style.display = "inline"
        Else
            ValidateTSList = True
            ButtonNext.Disabled = False
            Bad_OSGUID.style.display = "none"
        ENd if

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

    End Function

    Friday, August 10, 2012 5:10 PM
  • Thanks. Working now.
    Tuesday, August 14, 2012 5:06 PM
  • Patched file here: DeployWiz_SelectTS.vbs

    DikSoft - MCP



    • Edited by DmitryK Friday, July 26, 2013 12:12 PM error in link
    Friday, July 26, 2013 12:01 PM
  • Right file? Doesn't work, doesn't make any difference. Custom Sections in rules.ini are still skipped.

    Franz

    Friday, August 9, 2013 3:49 PM
  • Just edit the file with the information I provided on 4/23/12. Mine is still working aside from it occasionally not moving past the task sequence screen on single click, just click next again if it doesn't move on withinin 30 seconds or so.
    Friday, August 9, 2013 6:01 PM
  • Does anyone know if this is still an issue in MDT 2013 (Preview)?

    If it is then we need to raise it as a bug via the Connect site so that Microsoft have to resolve this in the next release.


    Jonathan Conway | My blog: Conway's IT Blog | Twitter: jonconwayuk | Linkedin: Jonathan Conway

    MCITP: Enterprise Administrator on Windows Server 2008/Enterprise Desktop Administrator on Windows 7 • MCP • MCSE 2003 • MCTS SCCM 2007, Windows 7 Config & Deploying • VCP

    Thursday, August 15, 2013 8:15 AM
  • Does anyone know if this is still an issue in MDT 2013 (Preview)?

    If it is then we need to raise it as a bug via the Connect site so that Microsoft have to resolve this in the next release.


    Jonathan Conway | My blog: Conway's IT Blog | Twitter: jonconwayuk | Linkedin: Jonathan Conway

    MCITP: Enterprise Administrator on Windows Server 2008/Enterprise Desktop Administrator on Windows 7 • MCP • MCSE 2003 • MCTS SCCM 2007, Windows 7 Config & Deploying • VCP

    Yes it still works, I tested with file version 6.2.5019.0

    Thursday, December 26, 2013 9:12 PM

  • Yes it still works, I tested with file version 6.2.5019.0

    What does that mean? Is this bug fixed in MDT 2013? Or do we still have to manually change the MDT 2013 scripts according all these NG posts? 
    Sunday, December 29, 2013 4:46 PM
  • It means the answer I posted in this thread is still a valid workaround for MDT 2013 to get settings per task sequence to work. Fyi its not a bug, it simply isn't a feature.
    Sunday, December 29, 2013 5:30 PM
  • Hi - this is a bug and has been reported to and accepted as such by the relevant team in Microsoft. It didn't make the 2013 release but they will be addressing it for the next one if it gets enough attention I suppose.

    I haven't been able to use the workaround successfully in MDT 2013 so I'll check by build numbers against those listed and retest as when I tried it on August 15th it didn't work.

    Details are in the following post:

    http://social.technet.microsoft.com/Forums/en-US/320aafee-07d2-4b96-9138-a902fec7edf5/mdt-2012-custom-rules-by-tasksequenceid-not-working-now?forum=mdt#0d534fb4-dbbe-424f-913b-201331db7d9a

    To help get this resolved then please "vote as important" on the Connect site to get it up the bug list:

    https://connect.microsoft.com/ConfigurationManagervnext/feedback/details/797776/customsettings-ini-tasksequenceid-based-subsections-in-cs-ini-are-not-picked-up-in-task-sequence



    Jonathan Conway | My blog: Conway's IT Blog | Twitter: jonconwayuk | Linkedin: Jonathan Conway

    MCITP: Enterprise Administrator on Windows Server 2008/Enterprise Desktop Administrator on Windows 7 • MCP • MCSE 2003 • MCTS SCCM 2007 | 2012, Windows 7 Config & Deploying • VCP


    Monday, December 30, 2013 12:13 PM
  • If you feel this is a bug, please ensure that it is documented in on the MDT Connect page.

    https://connect.microsoft.com/ConfigurationManagervnext/MicrosoftDeploymentToolkit2012


    Keith Garner - keithga.wordpress.com

    Thursday, January 2, 2014 5:44 AM
    Moderator
  • If you feel this is a bug, please ensure that it is documented in on the MDT Connect page.

    https://connect.microsoft.com/ConfigurationManagervnext/MicrosoftDeploymentToolkit2012


    Keith Garner - keithga.wordpress.com

    Hi Keith - I do feel it's a bug and have put a link to the Connect bug in my previous post up there ^ :-)

    It's on hold until the next release according to the bug report as it was too late for MDT 2013.

    JC



    Jonathan Conway | My blog: Conway's IT Blog | Twitter: jonconwayuk | Linkedin: Jonathan Conway

    MCITP: Enterprise Administrator on Windows Server 2008/Enterprise Desktop Administrator on Windows 7 • MCP • MCSE 2003 • MCTS SCCM 2007 | 2012, Windows 7 Config & Deploying • VCP

    • Proposed as answer by resident1155 Wednesday, November 26, 2014 3:05 PM
    • Unproposed as answer by resident1155 Friday, December 5, 2014 6:16 PM
    Thursday, January 2, 2014 1:21 PM
  • I too think this needs to be addressed. I have posted a request of it in the Feedback Center for MDT on Microsoft Connect. The post is entitled "Native ability to specify different Wizard settings based on selected Task Sequence". If anyone agrees with us and wants to see this fixed in a future update please log into Microsoft connect and vote my post up:

    https://connect.microsoft.com/ConfigurationManagervnext/Feedback

    Thanks!

    Tuesday, January 7, 2014 4:34 PM
  • Same problem here with the 2013 release. Why is this removed? Depricated feature or am I missing something in my set up?
    Saturday, April 5, 2014 10:10 PM
  • I also use MDT 2013 (6.2.5019.0) and confirmed this modification was necessary to implement and that it resolve the issue nicely.    Thank you for posting.   
    Thursday, August 21, 2014 2:48 PM
  • This was neede in MDT 2013 Update 1 as well. Worked a treat!

    Funny enough, did not need it in MDT 2013

    Friday, January 15, 2016 5:37 PM
  • Already wrote elsewhere...

    Hi, I had the same problem with 8343 and I found the solution : somes variables was not declared at all (Option Explicit).

    Work perfectly with a CS.ini beginning with:

    [Settings]
    Priority=DefaultGateway,TaskSequenceId,Default,Finish

    my DeployWiz_SelectTS.vbs : changes lines 93,95 and 129-130 (likely the same as 2012)

    ' // ***************************************************************************
    ' //
    ' // Copyright (c) Microsoft Corporation.  All rights reserved.
    ' //
    ' // Microsoft Deployment Toolkit Solution Accelerator
    ' //
    ' // File:      DeployWiz_Initialization.vbs
    ' //
    ' // Version:   6.3.8443.1000   MODIFIE TRISTAN POUR RELECTURE CS.INI    LIGNES 93-95 et 129-130
    ' //
    ' // Purpose:   Main Client Deployment Wizard Initialization routines
    ' //
    ' // ***************************************************************************


    Option Explicit


    '''''''''''''''''''''''''''''''''''''
    '  Image List
    '

    Dim g_AllOperatingSystems

    Function AllOperatingSystems


        Dim oOSes

        If isempty(g_AllOperatingSystems) then

            set oOSes = new ConfigFile
            oOSes.sFileType = "OperatingSystems"
            oOSes.bMustSucceed = false

            set g_AllOperatingSystems = oOSes.FindAllItems

        End if

        set AllOperatingSystems = g_AllOperatingSystems

    End function


    Function InitializeTSList
        Dim oItem, sXPathOld

        If oEnvironment.Item("TaskSequenceID") <> "" and oProperties("TSGuid") = "" then

            sXPathOld = oTaskSequences.xPathFilter
            for each oItem in oTaskSequences.oControlFile.SelectNodes( "/*/*[ID = '" & oEnvironment.Item("TaskSequenceID")&"']")
                oLogging.CreateEntry "TSGuid changed via TaskSequenceID = " & oEnvironment.Item("TaskSequenceID"), LogTypeInfo
                oEnvironment.Item("TSGuid") = oItem.Attributes.getNamedItem("guid").value
                exit for
            next

            oTaskSequences.xPathFilter = sXPathOld

        End if

        TSListBox.InnerHTML = oTaskSequences.GetHTMLEx ( "Radio", "TSGuid" )

        PopulateElements
        TSItemChange

    End function


    Function TSItemChange

        Dim oInput
        ButtonNext.Disabled = TRUE

        for each oInput in document.getElementsByName("TSGuid")
            If oInput.Checked then
                oLogging.CreateEntry "Found CHecked Item: " & oInput.Value, LogTypeVerbose

                ButtonNext.Disabled = FALSE
                exit function
            End if
        next

    End function


    '''''''''''''''''''''''''''''''''''''
    '  Validate task sequence List
    '

    Function ValidateTSList

        Dim oTS
        Dim sCmd, Oshell, oItem      '********** AJOUTE *************

        Set Oshell = createObject("Wscript.shell")     '******* AJOUTE **************
        set oTS = new ConfigFile
        oTS.sFileType = "TaskSequences"

        SaveAllDataElements

        If Property("TSGuid") = "" then
            oLogging.CreateEntry "No valid TSGuid found in the environment.", LogTypeWarning
            ValidateTSList = false
        End if

        oLogging.CreateEntry "TSGuid Found: " & Property("TSGuid"), LogTypeVerbose

        If oTS.FindAllItems.Exists(Property("TSGuid")) then
            oEnvironment.Item("TaskSequenceID") = oUtility.SelectSingleNodeString(oTS.FindAllItems.Item(Property("TSGuid")),"./ID")
        End if


        ' Set the related properties

        oUtility.SetTaskSequenceProperties oEnvironment.Item("TaskSequenceID")

        If oEnvironment.Item("OSGUID") <> "" and oEnvironment.Item("ImageProcessor") = "" then
            ' There was an OSGUID defined within the TS.xml file, however the GUID was not found
            ' within the OperatingSystems.xml file. Which is a dependency error. Block the wizard.
            ValidateTSList = False
            ButtonNext.Disabled = True
            Bad_OSGUID.style.display = "inline"
        Else
            ValidateTSList = True
            ButtonNext.Disabled = False
            Bad_OSGUID.style.display = "none"
        End if

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

    End Function

                                                                                       
    • Proposed as answer by LoXodonte Thursday, January 4, 2018 3:47 PM
    Sunday, July 2, 2017 5:19 PM
  • Thank you thank you thank you Tristan!!....you have no idea how infuriating it is to read that people "found a solution" and post a link to a thread which links to another thread yadda yadda yadda. It was comforting to read a concise solution dated somewhat recent.

    All I was trying to achieve was a different application selection dependent upon the chosen task sequence. While the above modification works, it doesn't work perfectly. If I backup through the wizard  after the initial choice of TS and choose a different TS it does not appear to regather or w/e. Whichever task sequence is originally chosen will maintain the associated settings under that Task Sequences header in CustomSettings.ini

    Also, I'm super hesitant on modifying deployment scripts as doing such had bit me once after upgrading a deployment share. I wanted to concisely compare the posted script modification to the original in Notepad++ and while I could follow it, it was difficult because it didn't line up as well I was would have hoped despite the minute changes. Anyway, thanks again.  

    Thursday, January 4, 2018 3:57 PM
  • I stand corrected...it does regather. If I run the TS which had 5 app selections first, and then backup through the wizard to run the TS with 0 apps, the 5 apps are still selected. In reverse order however, the app selection will change - basically indicating that once an app is selected, there is no way to unselect...at least I don't know how. Maybe enter dumby guids? 
    Thursday, January 4, 2018 4:06 PM
  • Agreed, we shouldn't have to modify these files to get this functionality. This type of fix has been around since 2010 as far as I know and regardless of how MS feels it's should be done, this is functionality that some of us need.


    I didn't read your exact implementation, but for my testing today I began to understand why this "feature" may have been removed. 

    If you create a task sequence [INSTALL.APPS] and list 1 application guid under it's task sequence header, and create another task sequence called [MAN.APPS] and list 5 mandatory applications under it's header, then you will find unanticipated behavior should you choose to back out of the [MAN.APPS] Task sequence via the Wizard and launch the [INSTALL.APPS]. You will find that the mandatory apps selections are still present in the [INSTALL.APPS] TS which should only have 1 app...AND, the man apps remain grey'd. Obviously this completely invalidates the purpose of TS based settings if the explicit settings you want implemented, aren't. This is just one example...MS's solution might've been to remove the back button, introduce new code, leave as is or just remove the option all together. With my limited understanding, it seems that the rules are caching some setting in the Wizard and that the wizzards cache would have to be cleared. More on this if I stop getting calls to test....

    Thursday, January 4, 2018 7:31 PM