Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Tooltips won't show when MsiInstallProduct employed

6 views
Skip to first unread message

Radovan

unread,
Nov 23, 2009, 6:25:01 AM11/23/09
to
Hello,
I have made a simple MSI package which shows a dialog with single editbox.
The Help column of the editbox in the Control table contains "Nonsensical
tooltip text.|" (export below).

Dialog_ Control Type X Y Width Height Attributes Property Text Control_Next Help
TooltipTestDlg Edit Edit 10 10 80 17 3 EditProperty Text Close Nonsensical
tooltip text.|

When I run the MSI package directly and hover mouse cursor over the editbox
a while the tooltip window which reads "Nonsensical tooltip text." appears.
When I run the package using MSI API MsiInstallProduct function, however, no
tooltip window pops up.

The source code for the bootstrapper application to run the package is
below. Define MSI_API to run the package via MsiInstallProduct or leave the
preprocessor variable definition out to run the package directly (via
CreateProcess).

I have tried other packages on Win XP an Vista with the same result. I.e. no
tooltips when MsiInstallProduct used.

Why the tooltips won't show when MsiInstallProduct is employed to launch an
installation?

Thank you,
Radovan

#include <windows.h>
#include <assert.h>
#include <msi.h>
#include <tchar.h>

// If MSI_API is defined the package is run using MsiInstallProduct. In such
case no tooltip text is shown.
// If MSI_API is NOT define the package is launched via CreateProcess.
Tooltips are shown as expected.
//#define MSI_API

int APIENTRY _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR
lpCmdLine, int nCmdShow)
{
#ifdef MSI_API
MsiSetInternalUI(INSTALLUILEVEL_FULL, NULL);
UINT nRetVal = MsiInstallProduct(_T("UI_Test_Lab.msi"), _T(""));
assert(nRetVal==ERROR_SUCCESS);
#else
STARTUPINFO startinf;
ZeroMemory(&startinf, sizeof(STARTUPINFO));
startinf.cb = sizeof(STARTUPINFO);

PROCESS_INFORMATION procesinf;
BOOL bResult = CreateProcess(NULL,
TEXT("msiexec /i UI_Test_Lab.msi"),
NULL,
NULL,
FALSE,
CREATE_NO_WINDOW,
NULL,
NULL,
&startinf,
&procesinf);

assert(bResult);

WaitForSingleObject(procesinf.hProcess , INFINITE);
#endif
return 0;
}

Radovan

unread,
Nov 24, 2009, 8:23:01 AM11/24/09
to
A similar problemobserved with the DirectoryCombo control. It won't show the
directory list if the package is launched by MsiInstallProduct yet it works
fine when CreateProcess used.

Phil Wilson

unread,
Nov 29, 2009, 12:58:21 PM11/29/09
to
It occurs to me that this may be a threading issue. UI won't behave properly
in a MTA thread, so make sure you are STA.
--
Phil Wilson

"Radovan" <Rad...@discussions.microsoft.com> wrote in message
news:66044DB8-389E-4941...@microsoft.com...

0 new messages