This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: MsiDatabaseOpenView problem in InstallScript
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 05, 2009
08:22 AM
MsiDatabaseOpenView problem in InstallScript
I am using MsiDatabaseOpenView problem in installscript.
HWND hView,hDatabase
hDatabase = MsiGetActiveDatabase(hInstall);
if ( !hDatabase )
{
return ERROR_INSTALL_FAILURE;
}
// Look for the ONLY Control table record where
// `Dialog_`='ReadyToInstall' AND `Control`='SummaryText'
if ( ERROR_SUCCESS != (uiRet = MsiDatabaseOpenView(hDatabase, "SELECT `Dialog_`, `Control`, `Text`, FROM `Control` WHERE (`Dialog_`='ReadyToInstall' AND `Control`='Summary')", hView)))
{
return ERROR_INSTALL_FAILURE;
}
Even Though it is giving ERROR_SUCCESS; but the value of hView is null when used in installscript.
The same script in c++ will be working if we just replace &hView in MsiDatabaseOpenView query. How do i use in installscript.
if(! hView) then
MessageBox("Null ")
else
MessageBox("NOT Null ")
endif
In C++ it will give NOT NULL but InstallScript it wil give NULL.
How to access the dialog in installscript.
HWND hView,hDatabase
hDatabase = MsiGetActiveDatabase(hInstall);
if ( !hDatabase )
{
return ERROR_INSTALL_FAILURE;
}
// Look for the ONLY Control table record where
// `Dialog_`='ReadyToInstall' AND `Control`='SummaryText'
if ( ERROR_SUCCESS != (uiRet = MsiDatabaseOpenView(hDatabase, "SELECT `Dialog_`, `Control`, `Text`, FROM `Control` WHERE (`Dialog_`='ReadyToInstall' AND `Control`='Summary')", hView)))
{
return ERROR_INSTALL_FAILURE;
}
Even Though it is giving ERROR_SUCCESS; but the value of hView is null when used in installscript.
The same script in c++ will be working if we just replace &hView in MsiDatabaseOpenView query. How do i use in installscript.
if(! hView) then
MessageBox("Null ")
else
MessageBox("NOT Null ")
endif
In C++ it will give NOT NULL but InstallScript it wil give NULL.
How to access the dialog in installscript.
(2) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 06, 2009
12:15 PM
There is an extra comma between `Text` and FROM that seems to be preventing this query from executing correctly. Note that this should not behave any differently in InstallScript or C++ since they both call directly into the same MSI API.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 07, 2009
10:19 AM
I think the problem with the MsiDatabaseOpenView is the last parameter which is the HANDLE to HWND. in c++ it is &hView, but in installscript when we write &hView , it will give error on compilation.
Anyway to rectify the problem.
Anyway to rectify the problem.