none
MDT 2012 U1 Custom Variables and Unattend Files?

    Question

  • Is it possible to call MDT Custom Variables during a silent installation that uses an unattend file? Such as specifying the product key of SCCM or SQL or anything else for that matter as a custom variable during the wizard in WinPE, and have the custom variable already referenced inside of the unattend file? I have the feeling the answer is no, so I'm just hoping to get a little clarification and attempt in finding a better route besides having to constantly go back and re-edit a product key inside of unattend files.

    Saturday, July 27, 2013 10:34 PM

Answers

All replies

  • If your goal is just to change the Product Key, use the ProductKey variable in CustomSettings.ini (either in Default or in any priority group) or in the MDT Database.  It is one of the values that ZTIConfigure injects into the Unattend.xml for you.

    If you are looking to add a new custom variable and have ZTIConfigure inject it into the Unattend.xml for you at Deployment, you could update ZTIConfigure.xml to include the new variable and the mapping information for Unattend.xml.  Otherwise, you can always jut create a custom variable and set it in CustomSettings.ini or the MDT Database and access it later during the deployment.


    David Coulter | http://DCtheGeek.blogspot.com | @DCtheGeek

    Saturday, July 27, 2013 10:51 PM
    Answerer
  • It is very possible, but its going to take some research and testing on your part. You would have to create a custom pane in the MDT wizard to create the new property and then have a script edit the unattend file. If you are using the MDT database, you could create the property in that and edit it based on a role, computer name, etc. Here are a few links to get you started.

    http://blogs.technet.com/b/mniehaus/archive/2012/03/01/3474394.aspx

    http://social.technet.microsoft.com/Forums/en-US/a85604e4-dfb8-4c87-bd0e-c110b2cb4b0c/create-custom-litetouch-wizard-questionvariable-mdt-2012-u1

    http://social.technet.microsoft.com/Forums/en-US/b78d8ec0-d55e-4e9f-9e1f-f6ff1f70bd8a/custom-pane-to-set-task-sequence-variable

    http://myitforum.com/cs2/blogs/hemsell/archive/2009/03/20/microsoft-deployment-toolkit-wizard-editor-part-1-introduction.aspx


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. ”

    • Marked as answer by H0pele5s Sunday, July 28, 2013 1:17 AM
    Sunday, July 28, 2013 12:11 AM
  • David, based off of what you said I could use the ProductKey to implement other keys such as one for SCCM and not for the intended operating system installation. (In some cases, I would need to have an operating system installation as well.) - I don't want to risk having the installation bomb out or install a product key for SCCM when it's Windows Server 2012.

    Frank, through your links I believe I have found my answer with how to call for the variable in an unattend file. Of course the only way to be certain is to test.

    I appreciate you both responding so quickly to this and offering sound solutions! I'll be sure to post my results to this thread as soon as I get a clean run and no errors so others aren't left dry. :)

    Implementing:

    System Center Custom Variables:
    (Originally found by Michael Klinteberg)

    To set an MDT variable:
    oEnvironment.Item("MDTVARIABLENAME") = "MyString"

    To get an MDT variable:
    sMyString = oEnvironment.Item("MDTVARIABLENAME")

    If this is correct, all I have to do is call for the custom variable by the customsettings.ini, and implement the value by a new pane in the beginning wizard. Once this is done, I can call for the custom variable in the unattend file.

    [Settings]
    Properties=MyCustomProperty

     

    If I've made a poor assumption, please post! :)

    Sunday, July 28, 2013 1:17 AM
  • No, ProductKey is a variable that's already defined and is used for injecting the Product Key into the Unattend.xml specifically.  You could define your own for use (maybe SCCMProductKey) and use it as you described from Michael for the getting and setting of the variable.  You can set your new variable with a new wizard pane are directly in CustomSettings.ini or even as a step Set Task Sequence Variable during a specific Task Sequence.

    Just as a note, if you are specifically trying to create an install for SCCM on Server 2012, then you might want to check out the Hydration Kits that Johan provides.  You can see the latest one for SCCM 2012 R2 here: http://www.deploymentresearch.com/Research/tabid/62/EntryId/98/The-Hydration-Kit-for-ConfigMgr-2012-R2-Preview-is-available-for-download.aspx


    David Coulter | http://DCtheGeek.blogspot.com | @DCtheGeek

    Sunday, July 28, 2013 4:01 AM
    Answerer