Custom Object Wizards

InstallShield 2019

To use your own wizard for your object, rather than InstallShield’s predefined stock wizard, you must supply an in-process COM server. This server must implement an IDevWizard interface. This interface is called by InstallShield when the object is first included in a project, and when Modify is selected from the context menu of an already included object in the Objects view’s Features pane. This interface is useful for displaying values of object properties and allowing those values to be changed.

This interface must offer a Display method with two arguments:

An IDispatch pointer that provides access to the object’s properties.
A Boolean return value that indicates whether changes should be made to an existing object’s properties or, if there is no existing object, whether a new object should be created.

In C++, this interface is defined as follows:

interface IDevWizard : IDispatch

{

HRESULT Display([in] IDispatch *pObject,

                [out, retval] VARIANT_BOOL* Confirmed);

};

The server can also implement an ISetupDesignObjectBuild interface. The InstallShield release builder calls this interface to determine which of the object’s features should be excluded from the build of a project containing the object. (If this interface is not implemented, all of the object’s features are included in the build.)

This interface is useful for excluding from the built project those object features that will never be installed because of selections that the installation author made in the object’s wizard. For example, if your object offers optional support for various drivers, and the project author chooses not to include some of those drivers, the features containing those drivers can be excluded from the built project.

This interface, if implemented, must offer an IsIncluded method with three arguments:

An IDispatch pointer that provides access to the object’s properties.
A string value specifying the feature, for example, Feature 1\Subfeature 1A.
A Boolean return value that indicates whether the component should be included in the build.

In C++, this interface is defined as follows:

interface ISetupDesignObjectBuild : IDispatch

{

HRESULT IsIncluded([in] IDispatch *pObject,

                   [in] BSTR FeaturePath,

                   [out, retval] VARIANT_BOOL* Included);

};

Note • When you are distributing an object that has a custom wizard, make sure to include any dependencies for the wizard .dll file in the distribution installation project. Include the required files in a feature that you place above the InstallShield Object Installer feature in the Setup Design or Features view. You can avoid having dependencies by creating a static wizard .dll file.