Subscribe element
Some events can't be published, only listened for. In that case, you'll use a Subscribe
element inside a Control
element. Use its Event
attribute to specify the event to listen for and Attribute
to set the required argument. The next example shows a ProgressBar
control that subscribes to the SetProgress
event. Whenever a standard or custom action notifies the installer that progress has been made, the ProgressBar
will know about it and add more ticks.
<Control Id="MyProgressBar" Type="ProgressBar" X="50" Y="50" Width="200" Height="20" ProgressBlocks="yes"> <Subscribe Event="SetProgress" Attribute="Progress" /> </Control>
Unlike the Publish
element, the Subscribe
element can't have a conditional statement as its inner text. A single control can, however, subscribe to more than one event. One example is to subscribe a Text
control to both the ScriptInProgress
and TimeRemaining
events...