This is WIX script fragment
<InstallExecuteSequence>
    <Custom Action="Warning" After="InstallFinalize">NOT INSTALLED</Custom>
</InstallExecuteSequence>
<CustomAction Id="Warning" BinaryKey="ExtendedActions" DllEntry="WarningAboutUpgrade" Execute="immediate" Return="check"/>
<Binary Id="ExtendedActions" SourceFile="$(var.ExtendedActions.TargetDir)$(var.ExtendedActions.TargetName).CA.dll" />
This is c# custom action code
using Microsoft.Deployment.WindowsInstaller;
namespace ExtendedActions
{
    public class CustomActions
    {
        [CustomAction]
        public static ActionResult WarningAboutUpgrade(Session session)
        {
            session.Log($"Begin CustomAction WarningAboutUpgrade");
            session.Message(InstallMessage.Info, new Record { FormatString = "Product updated. To upgrade Project execute initHeating.ps1 }" });
            return ActionResult.Success;
        }
    }
}
during the install process Message is not shown;
That's because you call session.Message with the parameter InstallMessage.Info. This causes that the text will not be shown to the user. The message can be found in the log-file instead. This behaviour is by design.
To archive your goal change the first parameter to InstallMessage.Warning or InstallMessage.Error
session.Message(InstallMessage.Warning, new Record 
{ 
  FormatString = "Product updated. To upgrade Project execute initHeating.ps1" 
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With