none
MDT 2013 - Different settings per task sequence RRS feed

  • Question

  • Hi,

    I'm trying to create different settings for different TaskSequenceIDs. For one TS I wanted to join the pc to a workgroup and do SkipApplications=YES and for the other TS I wanted to join a domain and do SkipApplications=NO. But I can't get it to work for some strange reason.

    I've tried and tested this solution https://gallery.technet.microsoft.com/scriptcenter/Different-settings-per-4faa55e9#content but it doesn't work.

    I tried this too : http://www.the-d-spot.org/wordpress/2012/07/20/how-to-use-different-settings-per-task-sequence-with-mdt-2012/ but it doesn't work.

    Perhaps MDT 2013 acts different then 2012 and 2010???? It would be nice if you could help me out on this one. :-)

    Paul

    Thursday, February 19, 2015 12:05 PM

Answers

  • @fapw, we use the database for a few years now and we're quite familiar with it. But we're going to install MDT for a client and they don't have SQL and they don't want to have it installed on one of their servers. So that's why I'm playing with the customsettings.ini. The first I made was for a plain and simple capture, then I added Make&Model and I'm making it more and more complex. The idea is to have a final customsettings.ini that imitates - or gets as close as possible to - what we have already accomplished with the database.

    In the meantime I've read that the skip-panels-stuff is something that stands above everything and thus it's not possible to control that using properties, like f.ex. MACaddress. Well, that's alright then.

    But I've got GOOD news for you all : selecting values for variables based on TaskSequenceID DOES WORK in MDT 2013 and ADK 8.1. This is what I did :

    https://gallery.technet.microsoft.com/scriptcenter/Different-settings-per-4faa55e9#content

    So I've downloaded the vbs, created an "external" tasksequenceid.ini which is read at the beginning of my Task Sequence and booted up the pc. When you select the tasksequence of your choice the parameters get filled in correctly ! OSDComputername was the variable that I used to show me if the other tasksequenceid.ini file was read or not. If yes, the computername would have to be my value, if not it would be MININT-randomnumber.

    Only downside of this fantastic wizard is that going back to change one of your options is not possible anymore. The moment a variable has a value, it doesn't change anymore! That particular behaviour was messing up my tests yesterday.

    • Marked as answer by KZen Muug Friday, February 20, 2015 9:57 AM
    Friday, February 20, 2015 9:55 AM
  • A small addendum, again good news :

    Per tasksequenceID you can choose which wizard panes you want to show. Or you can choose another password for the local admin. Or you can choose to join a workgroup or the domain. Or other stuff. But IF you want to do that it's very important to delete them in the DEFAULT section. If you don't do that the value in the DEFAULT section will be taken.

    '-----CORE SETTINGS-------------------------------------------------
    [Settings]
    Priority=TaskSequenceID
    Properties=MyCustomProperty
    
    '---------TaskSequenceID----------------------------------------------------
    [TS001]
    AdminPassword=PassWord001
    OSDComputername=ANiceOne
    JoinDomain=WORKGROUP
    SkipApplications=YES
    
    [TS002]
    OSDComputername=ANotSoNiceOne
    AdminPassword=OtherPassword
    JoinDomain=SomeDomain.be
    MachineObjectOU=OU=OU-NewPC,OU=OU-Workstation,DC=SomeDomain,DC=be
    SkipApplications=NO


    • Marked as answer by KZen Muug Friday, February 20, 2015 1:50 PM
    Friday, February 20, 2015 1:49 PM

All replies

  • Hmmmmm

    after some more reading I'm afraid I'll have to accept that it doesn't work in MDT 2013/ADK 8.1 and that Microsoft is aware of this.

    Paul


    EDIT : READ ON BECAUSE IN THE END I WAS WRONG. IT DOES WORK !
    • Edited by KZen Muug Friday, February 20, 2015 9:56 AM correcting myself
    Thursday, February 19, 2015 12:41 PM
  • Hello, Paul.

    Have you tried to use MDT Database?

    Thursday, February 19, 2015 12:53 PM
  • Paul,

    This is perfectly possible even without using a database. Leave the properties out of your CustomSettings.ini and put them as a task sequence variable in your Task Sequence.

    So you can at least have the domain join information in your task sequence.

    The skipapplications step is a bit more difficult since this actually happens prior the starting of the task sequence. But give it a try, I wouldn't rule out this works too!

    Cheers! Rens


    If this post is helpful please click "Mark for answer", thanks! Kind regards

    Thursday, February 19, 2015 9:37 PM
  • @fapw, we use the database for a few years now and we're quite familiar with it. But we're going to install MDT for a client and they don't have SQL and they don't want to have it installed on one of their servers. So that's why I'm playing with the customsettings.ini. The first I made was for a plain and simple capture, then I added Make&Model and I'm making it more and more complex. The idea is to have a final customsettings.ini that imitates - or gets as close as possible to - what we have already accomplished with the database.

    In the meantime I've read that the skip-panels-stuff is something that stands above everything and thus it's not possible to control that using properties, like f.ex. MACaddress. Well, that's alright then.

    But I've got GOOD news for you all : selecting values for variables based on TaskSequenceID DOES WORK in MDT 2013 and ADK 8.1. This is what I did :

    https://gallery.technet.microsoft.com/scriptcenter/Different-settings-per-4faa55e9#content

    So I've downloaded the vbs, created an "external" tasksequenceid.ini which is read at the beginning of my Task Sequence and booted up the pc. When you select the tasksequence of your choice the parameters get filled in correctly ! OSDComputername was the variable that I used to show me if the other tasksequenceid.ini file was read or not. If yes, the computername would have to be my value, if not it would be MININT-randomnumber.

    Only downside of this fantastic wizard is that going back to change one of your options is not possible anymore. The moment a variable has a value, it doesn't change anymore! That particular behaviour was messing up my tests yesterday.

    • Marked as answer by KZen Muug Friday, February 20, 2015 9:57 AM
    Friday, February 20, 2015 9:55 AM
  • Hello, KZen Muug.

    Thanks for sharing your experience with us.    

    Friday, February 20, 2015 10:24 AM
  • A small addendum, again good news :

    Per tasksequenceID you can choose which wizard panes you want to show. Or you can choose another password for the local admin. Or you can choose to join a workgroup or the domain. Or other stuff. But IF you want to do that it's very important to delete them in the DEFAULT section. If you don't do that the value in the DEFAULT section will be taken.

    '-----CORE SETTINGS-------------------------------------------------
    [Settings]
    Priority=TaskSequenceID
    Properties=MyCustomProperty
    
    '---------TaskSequenceID----------------------------------------------------
    [TS001]
    AdminPassword=PassWord001
    OSDComputername=ANiceOne
    JoinDomain=WORKGROUP
    SkipApplications=YES
    
    [TS002]
    OSDComputername=ANotSoNiceOne
    AdminPassword=OtherPassword
    JoinDomain=SomeDomain.be
    MachineObjectOU=OU=OU-NewPC,OU=OU-Workstation,DC=SomeDomain,DC=be
    SkipApplications=NO


    • Marked as answer by KZen Muug Friday, February 20, 2015 1:50 PM
    Friday, February 20, 2015 1:49 PM
  • Hello Kzen

    You mention in your comment that you have created a new TasksequenceId.ini:

    "So I've downloaded the vbs, created an "external" tasksequenceid.ini which is read at"

    But in the url you have in the same comment, they speak about a file with the name of "TaskSequence.ini".

    Which one is the right name ?

    Thursday, April 23, 2015 4:57 PM
  • Hello Kzen

    You mention in your comment that you have created a new TasksequenceId.ini:

    "So I've downloaded the vbs, created an "external" tasksequenceid.ini which is read at"

    But in the url you have in the same comment, they speak about a file with the name of "TaskSequence.ini".

    Which one is the right name ?

    Hi Anpuch, I see what you mean, but for this extra ini-file you can choose any name you want really. So in a way you could say that for absolute clarity the people in the URL could have used some other name then plain "tasksequence.ini". In the end I decided to use the name "CustomSettings_TS.ini". So I've got my normal customsettings.ini and I've got the customsettings_TS.ini which contains TaskSequence specific settings. But you choose the name, you could call it abracadabra.ini too. ;-) It's opens up lots of possibilities but please do test them thoroughly, because not all variables behave in the same way (Indeed, some of them still get overruled by the values in the default section).

    Paul

    Friday, April 24, 2015 7:11 AM
  • Replacing the DeployWiz_SelectTS.vbs placed by the MDT 2013 Update 1 with the DeployWiz_SelectTS.vbs that I took from my MDT 2012 Update 1 deploymentshare-backup also did the trick processing the tassequenceid rules after selecting!
    So no need for me taking this modified file. Thanks though :).

    Does anyone know why this was changed in MDT 2013 (Update 1)?


    • Edited by Ariendg Thursday, August 20, 2015 5:52 PM sentence incomplete
    Thursday, August 20, 2015 5:22 PM
  • I have found a similar topic that I will try out: https://social.technet.microsoft.com/Forums/en-US/e0af2f20-42d1-4df7-ad0c-4828a0909460/mdt-2013-update-1-preview-windows-10
    Thursday, August 20, 2015 6:38 PM
  • Adding a second Gather task makes no difference.

    You have to edit the DeployWiz_SelectTS.vbs file.

    Microsoft keeps closing these bug reports/suggestions on their connect portal as "postponed".

    So hopefully they will implement this one day.

    Friday, August 21, 2015 4:23 PM
  • I have actually been using this script for a few years now and (while it works) it does have one aspect that I find very annoying. After you select the task sequence you want to run and hit "next" there is a *very* long pause that happens as ZTIGather runs *again* behind the scenes to re-gather computer information re-process the rules file. I would love to find a way to shorten the delay that happens or maybe display some sort of progress indicator (like the one you see when Windows PE first boots up). You know just *something* so your MDT users know its not just hung up.

    Don't suppose anyone here has some sort of solution for this by any chance?

    Friday, September 4, 2015 4:17 PM
  • Soooooo that's a "no" then?
    Tuesday, September 8, 2015 1:58 PM
  • Gather is always time consuming.

    Most important details are logs. If you are unsure how to post logs or where to find them then reference https://keithga.wordpress.com/2014/10/24/video-mdt-2013-log-files-basics-bdd-log-and-smsts-log/

    Tuesday, September 8, 2015 6:51 PM
    Moderator
  • Gather is always time consuming.

    Most important details are logs. If you are unsure how to post logs or where to find them then reference https://keithga.wordpress.com/2014/10/24/video-mdt-2013-log-files-basics-bdd-log-and-smsts-log/


    Agreed but you know that progress indicator that shows when Windows PE first loads up the MDT LiteTouch Wizard? Man if there was just some way to show that again that alone would do it. Just some indication *something* was happening.
    Tuesday, September 8, 2015 7:57 PM
  • Gather is always time consuming.


    Most important details are logs. If you are unsure how to post logs or where to find them then reference https://keithga.wordpress.com/2014/10/24/video-mdt-2013-log-files-basics-bdd-log-and-smsts-log/


    Agreed but you know that progress indicator that shows when Windows PE first loads up the MDT LiteTouch Wizard? Man if there was just some way to show that again that alone would do it. Just some indication *something* was happening.

    The only modifications I've made to the original DeployWiz_SelectTS.vbs (MDT 2013 U1 build 8290).

    Progress bar code borrowed from LiteTouch.vbs:

    Function ValidateTSList

    '....................................
    ' ORIGINAL CODE HERE
    '....................................

    ''' MODIFIED
            oShell.Exec "MSHTA.exe """ & oUtility.ScriptDir & "\Wizard.hta"" /definition:WelcomeWiz_Initialize.xml"
            oItem = oShell.Run("wscript.exe """ & oUtility.ScriptDir & "\ZTIGather.wsf""", 1, true)
    ''' /MODIFIED
    End Function

    Wednesday, September 16, 2015 5:49 AM
  • Hello,

    did someone testet the deploywiz_selectTS.vbs file with the new MDT 8443 Version?

    i've noticed the the files are completely different from previous versions! the part where the add-ons are inserted doesn't have so much "dim vars" anylonger...

    i'm curious what happens when when replacing  the 8443 selectTs.vbs with that from script center...

    Thursday, January 12, 2017 2:33 PM
  • I noticed the same thing.  I tried applying the same method but the 8443 script is different, and I'm not familiar enough with vbs to start ripping it apart to make it work....if it even will.

    I did however have luck in my test lab. I migrated my existing MDT 2013 Update 2 deploywiz_selectTS.vbs to my 8443 instance and the method has been working well so far. Just copied\replaced the new one flat out.

    I will stress that this was my TEST lab and until I find a better process, I won't be doing this in live.  There's a reason they changed that file and I don't want to find out what is broken when I need it not broken.  

    I'm actually considering staging a deployment share for each task sequence that might take different cs settings because I just haven't been able to get custom settings per task sequence working in 8443.  At least without replacing the deploywiz....

    Friday, January 20, 2017 4:53 AM
  • 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

    Sunday, July 2, 2017 4:29 PM
  • Hello

    how about MDT 2013 update 2.

    is the process same as what Kzen Muug proposed ?

    thanks


    Monday, October 2, 2017 5:58 PM