Freigeben über


Customizing Wizards with MDT 2012

Many of you have customized the MDT 2010 wizards, and I expect that will be fairly common with MDT 2012 as well – after all, one of the design goals with having HTA-based wizards is to enable customization by creative IT pros.  But the process is going to be slightly different with MDT 2012.

First, let’s review the basic process most of you would go through with MDT 2010:

  • Download the MDT Wizard Editor from https://mdtwizardeditor.codeplex.com/.  This makes editing the wizard simpler (although not necessarily trivial – there can still be a fair amount of work to do, depending on the extent of the changes that you intend to make).
  • Open the “DeployWiz_Definition_ENU.xml” file and make the necessary changes:  Adding new panes, changing the HTML and properties of existing pane, etc.
  • Using Notepad or any other text editor, add any custom scripting to DeployWiz_Initialization.vbs or DeployWiz_Validation.vbs.
  • Test out all the changes using the MDT Wizard Editor, or if this isn’t possible (due to conditions on the wizard pane or logic contained in the pane itself) drop the changed files into the deployment share and try a deployment.

So it’s quite reasonable for you to try the same thing with MDT 2012.  But you’ll quickly discover that you can’t get very far.  You can open the file, but as soon as you click on one of the wizard panes in the left-hand column, you get this exception:

image

So what causes this?  Well, if you look at the files in the deployment share, you’ll notice that there are quite a few more that start with “DeployWiz”.  That’s because the entire wizard has been restructured.  Instead of having one set of large files (DeployWiz_Definition_ENU.xml, DeployWiz_Initialization.vbs, DeployWiz_Validation.vbs), there are now separate files for each wizard pane (e.g. DeployWiz_ComputerName.xml and DeployWiz_ComputerName.vbs).  The original files (DeployWiz_Definition_ENU.xml, etc.) are still around, but are much smaller – the bulk of the content has been separated out.

Why was this done?  Mainly because it makes the wizard code much easier to maintain.  It’s now much more obvious what script pieces are used for which wizard panes.  Additionally, it makes the wizard easier to test, as you can work on a single pane at a time without worrying about breaking another unrelated pane.

The individual panes are then tied together by the DeployWiz_Definiton_ENU.xml file.  If you look at this file, you’ll see that it’s pretty short, with entries like this:

<Pane id="SelectTaskSequence" reference="DeployWiz_SelectTS.xml">
    <Condition><![CDATA[UCASE(Property("SkipTaskSequence"))<>"YES" ]]></Condition>
</Pane>

All that is there is a reference (or link) to the separate files for each wizard pane, along with the conditions for when each wizard pane should be displayed.  (This helps with the testing as well:  By keeping the conditions in the DeployWiz_Definition_ENU.xml file instead of in the individual wizard files, those conditions don’t get in the way of “offline testing”, e.g. running just that one single wizard pane without going through a full deployment.)

So why does that cause problems with the Wizard Editor?  Simple:  It doesn’t understand that the wizard pane body is in a separate file.  It can’t follow the reference link (highlighted in yellow above) to the separate wizard pieces.  So does that mean the Wizard Editor is no longer useful?  Not at all – you can still use it to work on (and test) individual pages like DeployWiz_ComputerName.xml:

image

But you’ll need to edit the DeployWiz_Definition_ENU.xml file by hand.

I’m working on a new version of the Wizard Editor in my “free time” so that it learns how to follow these links (with other improvements added in too), but it might take a while before I can complete that work.

So what does the recommended workflow look like if you wanted to add a new wizard pane to MDT 2012?  Here are the basics:

  • Download the MDT Wizard Editor from https://mdtwizardeditor.codeplex.com/.
  • Make a copy of files for one of the wizard pane files.  For example, copy DeployWiz_AdminPassword.xml as “MyPane.xml” and DeployWiz_AdminPassword.vbs as “MyPane.vbs”.
  • Use the Wizard Editor to customize and test the new wizard pane.
  • When you are happy with the functionality of the new wizard pane, add an entry for it into DeployWiz_Definition_ENU.xml (just like all the others, with any conditions that you might need), then test it out as part of a normal deployment.

This new flow has another advantage too:  It makes it much easier to integrate a new wizard pane into MDT.  You don’t have to worry about reintegrating your changes into the “big” XML file each time you upgrade MDT – your separate files will continue to exist, untouched, so all you will need to do is add the “link” into DeployWiz_Definition_ENU.xml again and you’re good to go.

Comments

  • Anonymous
    January 01, 2003
    The comment has been removed

  • Anonymous
    January 01, 2003
    Hi Michael, Looking forward to your new MDTWizard editor. Thanks

  • Anonymous
    January 01, 2003
    Need help... Curious if anyone has done this already using MDT 2012. I want to popup a "Please Wait" dialog when the user clicks the next button in the wizard.  Right now it takes time to go from pane to pane and it looks like nothing is happening...  anyone have any suggestions or solutions?? Thanks David

  • Anonymous
    January 09, 2012
    Nice post.  Looking forward to the updated editor.

  • Anonymous
    January 11, 2012
    We have heavily customized our wizard and the main reason for not going to 2012 is because of the wizard editor.  If you get the wizard editor updated please share!

  • Anonymous
    March 08, 2012
    Great read! Using your guidelines I am trying to add a custom pane to the DeployWiz_Definition_ENU.xml based on the NICSettings_Definition_ENU.xml from the "script" folder. I added <Pane id="NetworkSettings" reference="NICSettings_Definition_ENU.xml"> <Condition><![CDATA[ UCase(Property("SkipNetworkSettings"))<>"YES"]]></Condition> to the DeployWiz_Definition_ENU.xml However it always fails with a VBScript Runtime Error "Error.13 = Type mismatch" pointing at "InitializeNetworkDialog" Isolated NICSettings_Definition_ENU.xml works fine... Any Ideas? Regards, Nik

  • Anonymous
    June 08, 2012
    Dear Micheal ! Nice hint for this problem. Can't wait to see the new version of the wizard editor. I use it to translate MDT Wizard in french with MDT 2010. Hope to the v3 quicly ! Thanks

  • Anonymous
    June 08, 2012
    I tried the scripts from MDT 2012 translated into German and for me it works perfectly

  • Anonymous
    June 20, 2012
    Hi Nik, Did you ever get this sorted out? I'm facing a similar issue currently while adding a new page. Thanks!

  • Anonymous
    June 20, 2012
    Hi, in MDT 2010, I added code to Summary_scripts.vbs to do some processing and send out a status email. I was calling out to different properties like a custom one: Property("ETRWIMImage") to report the information in the email. Now, in MDT 2012, I'm no longer able to grab these properties from within Summary_scripts.vbs, all property values come back empty. What can I do to make it work again?

  • Anonymous
    August 28, 2012
    Hi Michael, Can you give any update on the new Wizard Editor? Many thanks in advance.

  • Anonymous
    November 04, 2012
    Hi Michael, We only use the WizardEditor to keep the hostname plus other items that make up the hostname using site code etc. Can we just replace the existing screen with our old one that has been updated? Good post. Thanks Emilios

  • Anonymous
    February 08, 2013
    Hi Mike, I think tham MS should hire you to work full time on Wizard Editor not using your “free time”. :)) Thanks Tom

  • Anonymous
    August 07, 2014
    The comment has been removed

  • Anonymous
    July 06, 2016
    I had to make a job with MDT Assistant Editor, but now the next button does not work , then what is the problem?Who can help me at a distance?