UDI tasks are DLLs written in C++ that implement the ITask interface. You register the DLL with the UDI Wizard Designer task library by creating a UDI Wizard Designer configuration file (.config file) and placing it in the installation_folder\Bin\Config folder (where installation_folder is the folder in which you installed MDT).

Note   You can create a DLL that contains wizard pages, tasks, and validators within the same .dll file. You can also create a single UDI Wizard Designer configuration file (.config) that contains the configuration settings for the wizard pages, tasks, and validators in the DLL.

To create custom UDI tasks

1.   Write code that implements the ITask interface and the following methods:

·     Init. This method is called to initialize your task.

·     Execute. This method is called to run your task.

2.   Write code that registers the custom task class factory with the factory registry.

3.   Build the solution for your custom task.

Note   Ensure that the version of the DLL you create is the same processor platform as the installation of MDT. For example, if you install the 64-bit version of MDT, then build a 64-bit version of your custom UDI task.

4.   Create a Task element under the TaskLibrary element in the UDI Wizard Designer configuration file similar to the following excerpt:

<Task DLL="OSDRefreshWizard.dll" Description="Discovers supported applications for install." Type="Microsoft.OSDRefresh.AppDiscoveryTask" Name="Application Discovery">

   <TaskItem Type="Setter" Name="Status Bitmap">

      <Param Name="BitmapFilename"/>

   </TaskItem>

   <TaskItem Type="Setter" Name="Log File">

      <Param Name="log"/>

   </TaskItem>

   <TaskItem Type="Setter" Name="Write Configuration File">

      <Param Name="writecfg"/>

   </TaskItem>

   <TaskItem Type="Setter" Name="Read Configuration File">

      <Param Name="readcfg"/>

   </TaskItem>

</Task>

Note   All Task elements should include the BitmapFilename parameter. Specify all other parameters as the task requires. For example, in the previous excerpt, the log parameter is used to specify a parameter for the location of a log file.

5.   Copy the UDI Wizard Designer configuration file created in the previous step to the installation_folder\Bin\Config folder (where installation_folder is the folder in which you installed MDT).

6.   Copy the DLL for your custom task to the installation_folder\Templates\Distribution\Tools\ platform folder (where installation_folder is the folder in which you installed MDT and platform is x86 for the 32-bit version or x64 is for the 64-bit version).


Related Topics

User-Driven Installation Developers Guide