Reputation: 4207
I have created a WIX burn ui installer using bootstrapper. It copies a folder, copies some registry entries and installs a service. There are no custom actions. Is there a way to show the progress text in such a scenario? It should display what items are being copied, what registries are being created etc. Any help would be much appreciated. (Saw lot of similar questions but all of them are based on displaying progress text for Custom Actions)
Upvotes: 1
Views: 1553
Reputation: 2590
I know this is bit old question. But recently I came across same thing and I figured it out. Thought of sharing it with anyone who looking for answers :) .
You can add ExecuteMsiMessage Event handler to log the progress texts (eg: update registry, copying files and etc).
model.BootstrapperApplication.ExecuteMsiMessage += MessageHandler;
private void MessageHandler(object sender,ExecuteMsiMessageEventArgs e)
{
// your message here
ProgressStatusText = e.Message;
}
Upvotes: 1
Reputation: 7878
The OnExecuteMsiMessage
callback gives the BA access to what Windows Installer is doing. Here's how WixStdBA handles it:
virtual STDMETHODIMP_(int) OnExecuteMsiMessage(
__in_z LPCWSTR wzPackageId,
__in INSTALLMESSAGE mt,
__in UINT uiFlags,
__in_z LPCWSTR wzMessage,
__in DWORD cData,
__in_ecount_z_opt(cData) LPCWSTR* rgwzData,
__in int nRecommendation
)
{
#ifdef DEBUG
BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "WIXSTDBA: OnExecuteMsiMessage() - package: %ls, message: %ls", wzPackageId, wzMessage);
#endif
if (BOOTSTRAPPER_DISPLAY_FULL == m_command.display && (INSTALLMESSAGE_WARNING == mt || INSTALLMESSAGE_USER == mt))
{
int nResult = ::MessageBoxW(m_hWnd, wzMessage, m_pTheme->sczCaption, uiFlags);
return nResult;
}
if (INSTALLMESSAGE_ACTIONSTART == mt)
{
ThemeSetTextControl(m_pTheme, WIXSTDBA_CONTROL_EXECUTE_PROGRESS_ACTIONDATA_TEXT, wzMessage);
}
return __super::OnExecuteMsiMessage(wzPackageId, mt, uiFlags, wzMessage, cData, rgwzData, nRecommendation);
}
Upvotes: 2