HRESULT Init(IStringProperties *pProperties, ISettingsProperties *pTaskSettings)

If you are writing a task for the preflight page, call this method to initialize your task. The .config file contain XML that might look something like this:

 <Task DisplayName="Check Windows Scripting Host" Type="Microsoft.Wizard.ShellExecuteTask">

  <Setter Property="filename">%windir%\system32\cscript.exe</Setter>

  <Setter Property="parameters">Preflight\OSDCheckWSH.vbs</Setter>

  <Setter Property="BitmapFilename">images\WinScriptHost.bmp</Setter>

  <ExitCodes>

    <ExitCode State="Success" Type="0" Value="0" Text="" />

    <ExitCode State="Error" Type="-1" Value="*" Text="Windows Scripting Host not installed." />

  </ExitCodes>

</Task>

 

The pProperties parameter provides access to the three setter values, whereas the pTaskSettings parameter provides access to the Task element and children. Most tasks only need to read data from the pProperties parameter.

Related Topics

ITask Interface