Thursday 15 August 2013

ProgressText not working for custom action in WiX -


I want to show the progress of my custom action text during installation. I implemented the code in this form but it does not work.

All other text (file copy, for example) is shown, the ActionText table is properly populated and the ActionText.Action matches the CustomAction.Actuib value. Does anyone know what is going wrong? Here's the code:

Main YX Project:

  & lt; Products & gt; & Lt; CustomAction ID = "Mica" "Binerie" = "Mikalib" DLLInterity = "Micrometh" execute "Pause" Return = "Check" /> & Lt; InstallExecuteSequence & gt; & Lt; Custom Action = "Mica" "=" InstallFinalize "/>  & lt; UI & gt; & lt; UIRF Id =" MyUILibraryUI "/> & lt; / UI & gt;   

UI Library:

  & lt; wix ... & Gt; & lt; piece & gt; & gt; UI ID = "MyUILIBURYU" & gt; & gt; Progress Text Action = "MyKa" & gt; Perform my awkward CA ... & lt; / progress text & gt; ; ... & lt; Dialog ID = "dialog progression" ... & gt; & lt; control id = "Ctrl_ActionText" type = "text" ... & gt; & lt; membership program = "actiondata" = "Text" /> gt; control & gt; C # Custom Action Library:  
  public class MyCalib {[CustomAction] public Fixed ActionResult MyCAMethod (session session) {// System.Threading.Thread.Sleep (10000); // To show the text, do some system Threading Thread.Sleep (10000); // Show the text return action. ;}}    

The problem is that you are using "actiondata" but You are not sending your custom A message from Riya to the UI with this action data.

You must add something like this: lang-cs prettyprint-override "> public class MyCalib {[custom action] Public Static Action Rastalt Micrometh (session session) {Usage (record record = new record (0)) {record.SetString (0, "Macmeth is starting"); Session Message (InstallMessage.ActionData, Record); } System.Threading.Thread.Sleep (10000); // To show the text // Do some systems. threading. Thread Sleep (10000); // To return the text return action Success; }}

You can send as many messages as you want from your CA.

If you were using "ActionText" this will work but the custom action name / name without additional custom information

You will find additional information here:



No comments:

Post a Comment