Aleksandr Vishnyakov
Aleksandr Vishnyakov

Reputation: 1893

How I can display localized WiX UI in my managed bootstrapper?

When I used MSI package UI, I used WixUIExtension and "WixUI_ErrorProgressText" set. But when I use managed bootstrapper and ExecuteMsiMessage event to display progress text, it has no effect and I see text like "Action 6:43:04: ..."

Upvotes: 1

Views: 586

Answers (1)

Aleksandr Vishnyakov
Aleksandr Vishnyakov

Reputation: 1893

Try this:

private void ExecuteMsiMessage(object sender, ExecuteMsiMessageEventArgs e)
{
    lock (_lock)
    {
        if (e.MessageType == InstallMessage.ActionStart && e.Data != null && e.Data.Count > 1 && !string.IsNullOrWhiteSpace(e.Data[1]))
        {
            Message = e.Data[1];
        }
        e.Result = Canceled ? Result.Cancel : Result.Ok;
    }
}

Upvotes: 2

Related Questions