I want to show the progress text of my custom action during installation. I implemented the code as in WiX Progress Text for a Custom Action but it doesn't work.
All other text (file copy, for example) is shown, the ActionText table is correctly populated and the ActionText.Action matches CustomAction.Actuib values. Does anyone know what is going wrong? Here is the code:
Main WiX project:
<Product>
<CustomAction Id="MyCA" BinaryKey="MyCALib"
DllEntry="MyCAMethod" Execute="deferred"
Return="check" />
<InstallExecuteSequence>
<Custom Action="MyCA" Before="InstallFinalize" />
</InstallExecuteSequence>
<UI>
<UIRef Id="MyUILibraryUI" />
</UI>
</Product>
UI library:
<Wix ...><Fragment>
<UI Id="MyUILibraryUI">
<ProgressText Action="MyCA">Executing my funny CA...
</ProgressText>
...
<Dialog Id="Dialog_Progress" ...>
<Control Id="Ctrl_ActionText"
Type="Text" ...>
<Subscribe Event="ActionData" Attribute="Text" />
</Control>
...
C# custom action library:
public class MyCALib
{
[CustomAction]
public static ActionResult MyCAMethod(Session session)
{
System.Threading.Thread.Sleep(10000); // to show text
// do something
System.Threading.Thread.Sleep(10000); // to show text
return ActionResult.Success;
}
}