Create your own MDT Wizard


In a previous post I gave some explanations about MDT Wizards. In this post, I will show you how to create your own Wizard to customize your deployment process. 


How to get these scripts ?


Prerequisites
  • 1 code Editor, as Notepad++
  • A pinch of VBScript knowledge
  • A pinch of HTML and CSS knowledge
  • A little imagination

How it works ?

As explained in my previous post, to create a new wizard you will need the things below:
  • Create an XML file
  • Create a VBS file for actions on your wizard, if needed
  • Associate your VBS and XML files
  • Initialize your functions in the XML, using the initialization tag
  • Integrate your XML in the DeployWiz_Definition, if needed
To test this wizard I will show you, proceed as below:
  • Copy the png files in the Scripts folder
  • Copy the xml file in the Scripts folder
  • Copy the vbs file in the scripts folder
  • Add the content of Add_Wizard.css in the Scripts\Wizard.css file

Now let's give it a try and create a new wizard.


What will do our wizard ?

I will create a wizard that will display the system informations below:
  • Disk size
  • Network informations (IP, Mac, Mask)
  • Computer model or MTM (for Lenovo)
  • Deploy root
  • RAM
  • Is model supported
  • Battery check (if plugged in or not)
  • Battery percent charge
  • Battery remaining time
See below how will looks like this wizard:
Our new wizard
When the model is unsupported the Checking part will be as below:
Unsupported model
When the computer is plugged in, it'll be as below:
Computer is plugged in
We'll first integrate this wizard in the main wizard DeployWiz_Definition_ENU and then display it at the first place of the deployment process.


Create the XML file

See below, the XML file used to create this wizard. You will likely notice that to create this wizard I just used some HTML content.

Create the VBS file

Now we have created the display part for ou wizard, we need to add some actions.
See below the VBS content used for this wizard. This file will run WMI queries to display the computer model, MTM, serial number, RAM, Disk size and check if the model is supported. 

Once the VBS is ready, we need to initalize all functions in the XML in order to call them.
For that add the part below in the XML file, just below ]]</Body>



Test our new Wizard

As mentioned in my previous post, Wizards are launched through the Wizard.hta file that will interpret the XML as an HTML file. To see your new wizard you can run it using the commandline below:

Then the wizard will be displayed as below:
Test our new Wizard

Integrate our new Wizard

So far we have created our wizard, added actions. Now we need to display it in our deployment process. I'll show you two ways to do this.

First we'll integrate it in the Welcome wizard. To that end just add our Wizard as a pane in the BDD_Welcome_ENU.xml file. See below the final result.
Then we we'll integrate it in the DeployWiz Definition ENU wizard. See in my previous post what is this wizard. 
Add the part below in the XML, above the SelectTaskSequence pane.


Share this

Related Posts

Previous
Next Post »

1 commentaires:

commentaires
Anonyme
17 août 2016 à 16:34 delete

Might want to have a look on this: http://maikkoster.com/mdt-wizard-studio-beta-released-2/

Reply
avatar