locked
TaskSequenceID not being set, trying to use for customsettings.ini sub sections RRS feed

  • Question

  • I am trying to create sub sections in the customsettings.ini for each task sequence I have.  I have read countless sites, forums and blogs regarding this subject, but I still cannot get it to work.

    I am running MDT 2010 Update 1 x86 and in the task sequence I have set Gather local data and process with setting the rules file to nothing, customsettings.ini and even a custom named file, but nothing seems to work.  I have tried to match my settings exactly to what I have found on web sites.  In the ZTIGather.log, it looks like it is re-running gather after the task sequence is selected, but the TaskSequenceID is still blank.  However, the BDD.log does show TaskSequenceID being set.

    I have tried a UserExit script to manually set TaskSequenceID or even setting sequence variables, but none of these seem to be working as well (I may have not done these right, haven't extensively tested them yet).  I also tried setting the TaskSequenceID in ZTIGather.xml to overwrite=true hoping that would help, but it didn't.  I even uninstalled MDT and reinstalled it in hopes that it was some issue with the install or something along those lines.

    I am starting to get really frustrated with this issue and any help would be greatly appreciated.

    Update:  Actually, it looks like it is not re-running ZTIGather.  I could have sworn it was yesterday as the time stamps differed.

    Tuesday, October 26, 2010 2:30 PM

Answers

  • hi

     

    ok, that actually made it work but...

     

    1. hot dog.. it takes a long times just sitting there (running through ztigather again)

    Be nice if it didn't .. but of course.. it takes the time it takes..

     

    Ther MUST be another way...

     

    Johan wrote that it was possible just to add customsettings.ini to gather.. but I haven't been able to make that work at all.

     

     

     

    Also, if I choose TS1 and then move forward to computer name, and then joindomain screen (in my case) and THEN go back via the backbutton, then the Ts won't be renewed even though it runs or recently hacked ztigather command again..

     

    Has anyone else experienced this?

    And does what I write make sense ;-) ?

     


    Kindest regards, Martin
    Thursday, February 17, 2011 3:02 PM

All replies

  • Could you copy and paste your rules file?

    Your rules file should look something like this:

    Priority=TaskSequenceID, Default

    [TaskSequenceID1]

    [TaskSequenceID2]

    In the TS itself, the first gather step should be set to Gather and Process, and it should point to whichever rules file you are using. Typically it's customsettings.ini.


    -Nick O.
    Tuesday, October 26, 2010 3:39 PM
  • I have set the gather task to gather and process and it is currently set to use customsettings.ini.

    Here is the current customsettings.ini I am working with.

     

    [Settings]
    Priority=TaskSequenceID, Default
    
    [XP]
    OSDComputerName=XP
    SkipUserData=YES
    
    [Default]
    KeyboardLocale=en-us
    UserLocale=en-us
    UILanguage=en-us

     

    It is still not setting the TaskSequenceID.  From the ZTIGather.log, it still looks like it is not running gather again when the task sequence is selected.  I have even try adding a second Gather task and a Run Command Line task and made it run the ZTIGather.wsf, but that hasn't worked either.

    Could it possibly be a setting some where else in MDT that is affecting this or even a corrupt file/install?

    • Edited by APeavey Tuesday, October 26, 2010 4:49 PM
    Tuesday, October 26, 2010 4:47 PM
  • and [xp] is the task sequence id you see listed in the deployment workbench?  it would also be the folder name under the \control folder?
    MCTS: ConfigMgr, MDT / http://myitforum.com/cs2/blogs/cnackers/default.aspx
    Tuesday, October 26, 2010 4:48 PM
  • Yes and I have tried various names just in case that was the issue, none are working.
    Tuesday, October 26, 2010 4:53 PM
  • Yes and I have tried various names just in case that was the issue, none are working.

    The only one that will work is the actual ID as listed in the deployment workbench.

    Can you send us a screenshot of the first gather step in the TS you are trying to use.

     

    Thanks.


    MCTS: ConfigMgr, MDT / http://myitforum.com/cs2/blogs/cnackers/default.aspx
    Tuesday, October 26, 2010 5:00 PM
  • I guess I should have said that I have created other task sequences and used various IDs to make sure it wasn't my naming convention. 

    https://docs.google.com/leaf?id=0BytBP-BJ5JviZTVjODU4ZGEtODIwYS00ZTQ0LTg4Y2ItMjRkNjVkNDZkZGFh&hl=en&authkey=CNXF5NEE

    Tuesday, October 26, 2010 5:09 PM
  • Ok that's correct.  What are you expecting to happen then?

     

    SkipUserData will skip the wizard pane, that won't help you when that's configured in a TS.  OSDComputerName should to set the name though, however, the first value set for OSDComputerName will win, it can't be overwritten, so if you are setting that in the wizard, your cs.ini setting won't do anything.


    MCTS: ConfigMgr, MDT / http://myitforum.com/cs2/blogs/cnackers/default.aspx
    Tuesday, October 26, 2010 5:22 PM
  • I am expecting it to use the settings in [XP] when I select the XP task sequence, but it is not.

    Like I said, the ZTIGather.log is showing that TaskSequenceID is being set to nothing.  Which I assume is part of the problem, I just don't know why it is not getting set.  In the current config, it looks like it is not re-running the rules when the task is selected and from all the information I have found, I have it setup properly so it should.

    Tuesday, October 26, 2010 6:43 PM
  • I am expecting it to use the settings in [XP] when I select the XP task sequence, but it is not.

    Like I said, the ZTIGather.log is showing that TaskSequenceID is being set to nothing.  Which I assume is part of the problem, I just don't know why it is not getting set.  In the current config, it looks like it is not re-running the rules when the task is selected and from all the information I have found, I have it setup properly so it should.

    Well the settings you listed wont' do anything... you'll need additional code to filter the wizard screens and skip the User Data wizard pane if that is what you are attempting.  

    Try setting an application by the TS ID and see if that works, that is supported for sure. Applications001 or MandatoryApplications001 will work.


    MCTS: ConfigMgr, MDT / http://myitforum.com/cs2/blogs/cnackers/default.aspx
    Tuesday, October 26, 2010 6:47 PM
  • I am following this article as the basis of what I am trying to do.

    http://www.deployvista.com/Home/tabid/36/EntryID/139/language/en-US/Default.aspx

    If I am understanding this correctly, MDT should set TaskSequenceID to the ID of the task sequence selected.  From there, you have sub sections in the customsettings.ini that it will process depending on what is in the sub section and the TaskSequenceID.  So with my current customsettings.ini, when I select the XP task sequence it should set the computer name to XP and then skip the user data wizard (which it will if these settings are in [Default]), but it is not and I am at a loss.

    • Proposed as answer by Ty Glander Tuesday, February 19, 2013 9:28 PM
    Tuesday, October 26, 2010 7:46 PM
  • Following the example in the article I linked, I put just JoinDomain in [XP] and that is not working either.
    Tuesday, October 26, 2010 7:53 PM
  • Upon further testing it looks like, for whatever reason, it is not processing gather again once the task sequence is selected.  If I run it manually after I select the task sequence, then TaskSequenceID is set properly and any settings I have set in the sub section are processed.

    I am now confused why gather is not processing a second time, even though I have gather and process enabled.

    Tuesday, October 26, 2010 8:14 PM
  • I got this working by using the following technet post.  It doesn't seem right that this has to be "hacked" in, but from the issues I was having, I am either missing a setting some where or my install is messed up.  This is working for me and I can customize each task sequence as needed.

    http://social.technet.microsoft.com/Forums/en-US/mdt/thread/fa1235a7-3b09-4291-b2e8-1058fbfa90ae

    To expand on the post, in the ValidateTSList function in DeployWiz_Validation.vbs, make sure to have Dim sCmd and Dim oItem (I think this was already there) in the top section with the other variables.  Then after the oLogging.CreateEntry "DeploymentType = " & oProperties("DeploymentType"), LogTypeInfo line, I added the following code.

     

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

     

    I don't know if this is the best place or not, but it is similar to another function in that file that calls the same commands.

     

    • Proposed as answer by Martin Rask Tuesday, November 15, 2011 8:57 AM
    Tuesday, October 26, 2010 9:37 PM
  • I hate to say it, but I am having this exact problem.

    I tried the hack, but so far no luck... am getting a vbscript error..

     

    my script looks like:

     

    End if

        oLogging.CreateEntry "DeploymentType = " & oProperties("DeploymentType"), LogTypeInfo
        sCmd = "cscript.exe """ & oUtility.ScriptDir & "\ZTIGather.wsf"""
        oItem = oSHell.Run(sCmd, , true)


       
        set oTaskList = nothing
        set oTS = nothing

     

     

    lines 530 ish...

     

    ==

    The error I am getting is:

     

    a vbscript runtime error has occurred:

    Error: 500 = The variable has not been defined

    VBscript Code:

    ValidateTSList


    Kindest regards, Martin
    Thursday, February 17, 2011 1:27 PM
  • Above that section where all the Dim commands are, you need to add a line:

    Dim sCmd

    I presume you didnt do that bit?  Hence the sCmd variable had not been defined.

    Thursday, February 17, 2011 1:49 PM
  • hi

     

    ok, that actually made it work but...

     

    1. hot dog.. it takes a long times just sitting there (running through ztigather again)

    Be nice if it didn't .. but of course.. it takes the time it takes..

     

    Ther MUST be another way...

     

    Johan wrote that it was possible just to add customsettings.ini to gather.. but I haven't been able to make that work at all.

     

     

     

    Also, if I choose TS1 and then move forward to computer name, and then joindomain screen (in my case) and THEN go back via the backbutton, then the Ts won't be renewed even though it runs or recently hacked ztigather command again..

     

    Has anyone else experienced this?

    And does what I write make sense ;-) ?

     


    Kindest regards, Martin
    Thursday, February 17, 2011 3:02 PM
  • hi

     

    ok, that actually made it work but...

     

    1. hot dog.. it takes a long times just sitting there (running through ztigather again)

    Be nice if it didn't .. but of course.. it takes the time it takes..

     

    Ther MUST be another way...

     

    Johan wrote that it was possible just to add customsettings.ini to gather.. but I haven't been able to make that work at all.

     

     

     

    Also, if I choose TS1 and then move forward to computer name, and then joindomain screen (in my case) and THEN go back via the backbutton, then the Ts won't be renewed even though it runs or recently hacked ztigather command again..

     

    Has anyone else experienced this?

    And does what I write make sense ;-) ?

     


    Kindest regards, Martin


    That makes sense and i've found exactly the same.

    When choosing a TS, it takes a good 5 seconds to progress, in which time i can still scroll and click other TS.

    Also, if you select a TS then go back, the gather does not re-run and the CS options from the first TS are still applied.

     

    I agree, there has to be a way around this.  It's just not right!

    Thursday, February 17, 2011 4:31 PM
  • I agree.

     

    I've writted a comment on Johan's blog regarding this issue, and I hope it can be resolved.!


    Kindest regards, Martin
    Friday, February 18, 2011 7:12 AM
  • I'm in the same boat. I'm trying the added script right now to see if it will work. There has been too many people with this same issue. Hopefully, this will be resolved in Update 2 (if there is one).

    -Mike

    Friday, February 18, 2011 9:32 PM
  • Hi,

     

    Today, I tried MDT 2012 beta 1, there is the same problem. The new script DeployWiz_validation.vbs is empty. To troubleshoot, you need to 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)

     

     

    Franck

    • Proposed as answer by mtarggart Monday, June 4, 2012 9:48 PM
    Tuesday, June 14, 2011 2:30 PM
  • HI !

    Thank you for the help in this post.

    I tried the 'hack' without success. It is available here if someone would check... => http://cid-b89627dc55601b00.office.live.com/self.aspx/.Public/DeployWiz%5E_Validation.vbs

    I add in my TS > Initialization > Gather local only > Gather local data and process rules > customSettings.ini

    I also tried to add in this line => Priority=TaskSequenceID, Default, INS_XP_x86_1, INS_7_x86_1

    I tried to add simple setup in the CustomSetting.ini => 

     

     

     

    [Settings]
    Priority=TaskSequenceID, Default
    
    Properties=MyCustomProperty
    
    [Default]
    
    SkipAdminPassword=YES
    SkipProductKey=YES
    SkipBDDWelcome=YES
    
    
    [INS_XP_x86_1]
    
    SkipComputerName=NO
    JoinWorkgroup=WORKGROUP
    
    
    [INS_7_x86_1]
    
    SkipComputerName=YES
    SkipBitLocker=YES
    

     

    If someone who got this working would explain what are the exacts steps. Or share his CS.ini and DeployWiz_Initialization.vbs to compare. I would really appreciate !!
    Sources/Links

     

    Yann



    • Edited by Sayannara Thursday, June 16, 2011 11:52 AM layout
    Thursday, June 16, 2011 11:50 AM
  • it is my understanding that this can't work as you are expecting for this reason:

     

    you are asking it to skip a wizard screen (or prompt) after it is already in progress... you would need to create a new HTA via the media hook to set this before the wizard starts. or a custom front end

    check out these link:

    http://www.deployvista.com/Blog/tabid/70/EntryID/139/language/en-US/Default.aspx

    feel free to correct me on this but i am working on a similar issue...

    I would just like to be able to just select which TS to run... name the box, and have everything else defined in the CS.ini  but no luck

    I.e. choose between a fresh install (skip user restore and everyting else) and an inplace refresh (prompt for user file backup, etc)

    very similar scenerio... but no luck yet

    however... you are correct, it should be made much simpler :(

     

     


    ~Shadster
    Thursday, June 16, 2011 4:00 PM
  • i just stumbled across this today... recently updated.

     

    might be an option for you as well:

    http://www.migee.com/2011/03/18/dynamic-settings-per-task-sequence-in-mdt-2010-through-coding/

     

    this rewrites some of the ztigather.wsf and ztiutility.vbs to make it a little more "dynamic"... great thinking Mike!


    ~Shadster
    Thursday, June 16, 2011 6:32 PM
  • Thank you for your replies.

    I'm going to spend 2 more hours about this case this afternoon. Hope your links help ! I let you know.

    Yann 

    Friday, June 17, 2011 1:07 PM
  • Hi,

    Today, I tried MDT 2012 beta 1, there is the same problem. The new script DeployWiz_validation.vbs is empty. To troubleshoot, you need to 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)

    Franck

    this seems to work for me.. am testing as I type this...

    It would be nice if it would show something... the gather window or a msgbox saying that it is working... that way people won't be tempted to press the button again.. but perhaps the wscript/cscript trick can do it..


    Kindest regards, Martin

    Wednesday, January 30, 2013 10:46 AM