msi: Clean up the database queries.

This commit is contained in:
Hans Leidekker 2011-07-27 10:53:26 +02:00 committed by Alexandre Julliard
parent d1b2058500
commit e1c2e8828f
15 changed files with 431 additions and 592 deletions

File diff suppressed because it is too large Load diff

View file

@ -135,8 +135,12 @@ static UINT alter_add_column(MSIALTERVIEW *av)
{
r = MSI_IterateRecords(view, NULL, ITERATE_columns, &colnum);
msiobj_release(&view->hdr);
if (r != ERROR_SUCCESS)
{
columns->ops->delete(columns);
return r;
}
}
r = columns->ops->add_column(columns, av->colinfo->table,
colnum, av->colinfo->column,
av->colinfo->type, (av->hold == 1));

View file

@ -1072,10 +1072,9 @@ static UINT iterate_appsearch(MSIRECORD *row, LPVOID param)
UINT ACTION_AppSearch(MSIPACKAGE *package)
{
static const WCHAR query[] = {
's','e','l','e','c','t',' ','*',' ',
'f','r','o','m',' ',
'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ',
'A','p','p','S','e','a','r','c','h',0};
MSIQUERY *view = NULL;
MSIQUERY *view;
UINT r;
if (msi_action_is_unique(package, szAppSearch))
@ -1092,7 +1091,6 @@ UINT ACTION_AppSearch(MSIPACKAGE *package)
r = MSI_IterateRecords( view, NULL, iterate_appsearch, package );
msiobj_release( &view->hdr );
return r;
}
@ -1127,10 +1125,9 @@ static UINT ITERATE_CCPSearch(MSIRECORD *row, LPVOID param)
UINT ACTION_CCPSearch(MSIPACKAGE *package)
{
static const WCHAR query[] = {
's','e','l','e','c','t',' ','*',' ',
'f','r','o','m',' ',
'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ',
'C','C','P','S','e','a','r','c','h',0};
MSIQUERY *view = NULL;
MSIQUERY *view;
UINT r;
if (msi_action_is_unique(package, szCCPSearch))
@ -1147,6 +1144,5 @@ UINT ACTION_CCPSearch(MSIPACKAGE *package)
r = MSI_IterateRecords(view, NULL, ITERATE_CCPSearch, package);
msiobj_release(&view->hdr);
return r;
}

View file

@ -74,12 +74,12 @@ static MSIAPPID *load_appid( MSIPACKAGE* package, MSIRECORD *row )
static MSIAPPID *load_given_appid( MSIPACKAGE *package, LPCWSTR name )
{
static const WCHAR query[] = {
'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ',
'`','A','p','p','I','d','`',' ','W','H','E','R','E',' ',
'`','A','p','p','I','d','`',' ','=',' ','\'','%','s','\'',0};
MSIRECORD *row;
MSIAPPID *appid;
static const WCHAR ExecSeqQuery[] =
{'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ',
'`','A','p','p','I','d','`',' ','W','H','E','R','E',' ',
'`','A','p','p','I','d','`',' ','=',' ','\'','%','s','\'',0};
if (!name)
return NULL;
@ -94,13 +94,12 @@ static MSIAPPID *load_given_appid( MSIPACKAGE *package, LPCWSTR name )
}
}
row = MSI_QueryGetRecord(package->db, ExecSeqQuery, name);
row = MSI_QueryGetRecord(package->db, query, name);
if (!row)
return NULL;
appid = load_appid(package, row);
msiobj_release(&row->hdr);
return appid;
}
@ -179,12 +178,12 @@ static MSIPROGID *load_progid( MSIPACKAGE* package, MSIRECORD *row )
static MSIPROGID *load_given_progid(MSIPACKAGE *package, LPCWSTR name)
{
static const WCHAR query[] = {
'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ',
'`','P','r','o','g','I','d','`',' ','W','H','E','R','E',' ',
'`','P','r','o','g','I','d','`',' ','=',' ','\'','%','s','\'',0};
MSIPROGID *progid;
MSIRECORD *row;
static const WCHAR ExecSeqQuery[] =
{'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ',
'`','P','r','o','g','I','d','`',' ','W','H','E','R','E',' ',
'`','P','r','o','g','I','d','`',' ','=',' ','\'','%','s','\'',0};
if (!name)
return NULL;
@ -199,13 +198,12 @@ static MSIPROGID *load_given_progid(MSIPACKAGE *package, LPCWSTR name)
}
}
row = MSI_QueryGetRecord( package->db, ExecSeqQuery, name );
row = MSI_QueryGetRecord( package->db, query, name );
if (!row)
return NULL;
progid = load_progid(package, row);
msiobj_release(&row->hdr);
return progid;
}
@ -310,12 +308,12 @@ static MSICLASS *load_class( MSIPACKAGE* package, MSIRECORD *row )
*/
static MSICLASS *load_given_class(MSIPACKAGE *package, LPCWSTR classid)
{
static const WCHAR query[] = {
'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ',
'`','C','l','a','s','s','`',' ','W','H','E','R','E',' ',
'`','C','L','S','I','D','`',' ','=',' ','\'','%','s','\'',0};
MSICLASS *cls;
MSIRECORD *row;
static const WCHAR ExecSeqQuery[] =
{'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ',
'`','C','l','a','s','s','`',' ','W','H','E','R','E',' ',
'`','C','L','S','I','D','`',' ','=',' ','\'','%','s','\'',0};
if (!classid)
return NULL;
@ -330,13 +328,12 @@ static MSICLASS *load_given_class(MSIPACKAGE *package, LPCWSTR classid)
}
}
row = MSI_QueryGetRecord(package->db, ExecSeqQuery, classid);
row = MSI_QueryGetRecord(package->db, query, classid);
if (!row)
return NULL;
cls = load_class(package, row);
msiobj_release(&row->hdr);
return cls;
}
@ -370,12 +367,11 @@ static MSIMIME *load_mime( MSIPACKAGE* package, MSIRECORD *row )
static MSIMIME *load_given_mime( MSIPACKAGE *package, LPCWSTR mime )
{
static const WCHAR query[] = {
'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ',
'`','M','I','M','E','`',' ','W','H','E','R','E',' ',
'`','C','o','n','t','e','n','t','T','y','p','e','`',' ','=',' ','\'','%','s','\'',0};
MSIRECORD *row;
static const WCHAR ExecSeqQuery[] =
{'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ',
'`','M','I','M','E','`',' ','W','H','E','R','E',' ',
'`','C','o','n','t','e','n','t','T','y','p','e','`',' ','=',' ',
'\'','%','s','\'',0};
MSIMIME *mt;
if (!mime)
@ -391,13 +387,12 @@ static MSIMIME *load_given_mime( MSIPACKAGE *package, LPCWSTR mime )
}
}
row = MSI_QueryGetRecord(package->db, ExecSeqQuery, mime);
row = MSI_QueryGetRecord(package->db, query, mime);
if (!row)
return NULL;
mt = load_mime(package, row);
msiobj_release(&row->hdr);
return mt;
}
@ -440,14 +435,12 @@ static MSIEXTENSION *load_extension( MSIPACKAGE* package, MSIRECORD *row )
*/
static MSIEXTENSION *load_given_extension( MSIPACKAGE *package, LPCWSTR name )
{
MSIRECORD *row;
static const WCHAR query[] = {
'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ',
'`','E','x','t','e','n','s','i','o','n','`',' ','W','H','E','R','E',' ',
'`','E','x','t','e','n','s','i','o','n','`',' ','=',' ','\'','%','s','\'',0};
MSIEXTENSION *ext;
static const WCHAR ExecSeqQuery[] =
{'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ',
'`','E','x','t','e','n','s','i','o','n','`',' ',
'W','H','E','R','E',' ',
'`','E','x','t','e','n','s','i','o','n','`',' ','=',' ',
'\'','%','s','\'',0};
MSIRECORD *row;
if (!name)
return NULL;
@ -465,13 +458,12 @@ static MSIEXTENSION *load_given_extension( MSIPACKAGE *package, LPCWSTR name )
}
}
row = MSI_QueryGetRecord( package->db, ExecSeqQuery, name );
row = MSI_QueryGetRecord( package->db, query, name );
if (!row)
return NULL;
ext = load_extension(package, row);
msiobj_release(&row->hdr);
return ext;
}
@ -548,14 +540,12 @@ static UINT iterate_all_classes(MSIRECORD *rec, LPVOID param)
static VOID load_all_classes(MSIPACKAGE *package)
{
UINT rc = ERROR_SUCCESS;
static const WCHAR query[] = {
'S','E','L','E','C','T',' ','*',' ', 'F','R','O','M',' ','`','C','l','a','s','s','`',0};
MSIQUERY *view;
UINT rc;
static const WCHAR ExecSeqQuery[] =
{'S','E','L','E','C','T',' ','*',' ', 'F','R','O','M',' ',
'`','C','l','a','s','s','`',0};
rc = MSI_DatabaseOpenViewW(package->db, ExecSeqQuery, &view);
rc = MSI_DatabaseOpenViewW(package->db, query, &view);
if (rc != ERROR_SUCCESS)
return;
@ -595,14 +585,12 @@ static UINT iterate_all_extensions(MSIRECORD *rec, LPVOID param)
static VOID load_all_extensions(MSIPACKAGE *package)
{
UINT rc = ERROR_SUCCESS;
static const WCHAR query[] = {
'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ','`','E','x','t','e','n','s','i','o','n','`',0};
MSIQUERY *view;
UINT rc;
static const WCHAR ExecSeqQuery[] =
{'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ',
'`','E','x','t','e','n','s','i','o','n','`',0};
rc = MSI_DatabaseOpenViewW(package->db, ExecSeqQuery, &view);
rc = MSI_DatabaseOpenViewW( package->db, query, &view );
if (rc != ERROR_SUCCESS)
return;
@ -622,14 +610,13 @@ static UINT iterate_all_progids(MSIRECORD *rec, LPVOID param)
static VOID load_all_progids(MSIPACKAGE *package)
{
UINT rc = ERROR_SUCCESS;
static const WCHAR query[] = {
'S','E','L','E','C','T',' ','`','P','r','o','g','I','d','`',' ','F','R','O','M',' ',
'`','P','r','o','g','I','d','`',0};
MSIQUERY *view;
UINT rc;
static const WCHAR ExecSeqQuery[] =
{'S','E','L','E','C','T',' ','`','P','r','o','g','I','d','`',' ',
'F','R','O','M',' ', '`','P','r','o','g','I','d','`',0};
rc = MSI_DatabaseOpenViewW(package->db, ExecSeqQuery, &view);
rc = MSI_DatabaseOpenViewW(package->db, query, &view);
if (rc != ERROR_SUCCESS)
return;
@ -639,14 +626,12 @@ static VOID load_all_progids(MSIPACKAGE *package)
static VOID load_all_verbs(MSIPACKAGE *package)
{
UINT rc = ERROR_SUCCESS;
static const WCHAR query[] = {
'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ','`','V','e','r','b','`',0};
MSIQUERY *view;
UINT rc;
static const WCHAR ExecSeqQuery[] =
{'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ',
'`','V','e','r','b','`',0};
rc = MSI_DatabaseOpenViewW(package->db, ExecSeqQuery, &view);
rc = MSI_DatabaseOpenViewW(package->db, query, &view);
if (rc != ERROR_SUCCESS)
return;
@ -666,16 +651,13 @@ static UINT iterate_all_mimes(MSIRECORD *rec, LPVOID param)
static VOID load_all_mimes(MSIPACKAGE *package)
{
UINT rc = ERROR_SUCCESS;
static const WCHAR query[] = {
'S','E','L','E','C','T',' ','`','C','o','n','t','e','n','t','T','y','p','e','`',' ',
'F','R','O','M',' ','`','M','I','M','E','`',0};
MSIQUERY *view;
UINT rc;
static const WCHAR ExecSeqQuery[] =
{'S','E','L','E','C','T',' ',
'`','C','o','n','t','e','n','t','T','y','p','e','`',
' ','F','R','O','M',' ',
'`','M','I','M','E','`',0};
rc = MSI_DatabaseOpenViewW(package->db, ExecSeqQuery, &view);
rc = MSI_DatabaseOpenViewW(package->db, query, &view);
if (rc != ERROR_SUCCESS)
return;
@ -960,7 +942,6 @@ UINT ACTION_RegisterClassInfo(MSIPACKAGE *package)
msi_ui_actiondata( package, szRegisterClassInfo, uirow );
msiobj_release(&uirow->hdr);
}
RegCloseKey(hkey);
return ERROR_SUCCESS;
}
@ -1051,7 +1032,6 @@ UINT ACTION_UnregisterClassInfo( MSIPACKAGE *package )
msi_ui_actiondata( package, szUnregisterClassInfo, uirow );
msiobj_release( &uirow->hdr );
}
RegCloseKey( hkey );
return ERROR_SUCCESS;
}
@ -1132,7 +1112,6 @@ UINT ACTION_RegisterProgIdInfo(MSIPACKAGE *package)
msi_ui_actiondata( package, szRegisterProgIdInfo, uirow );
msiobj_release( &uirow->hdr );
}
return ERROR_SUCCESS;
}
@ -1167,7 +1146,6 @@ UINT ACTION_UnregisterProgIdInfo( MSIPACKAGE *package )
msi_ui_actiondata( package, szUnregisterProgIdInfo, uirow );
msiobj_release( &uirow->hdr );
}
return ERROR_SUCCESS;
}
@ -1249,8 +1227,7 @@ static UINT register_verb(MSIPACKAGE *package, LPCWSTR progid,
UINT ACTION_RegisterExtensionInfo(MSIPACKAGE *package)
{
static const WCHAR szContentType[] =
{'C','o','n','t','e','n','t',' ','T','y','p','e',0 };
static const WCHAR szContentType[] = {'C','o','n','t','e','n','t',' ','T','y','p','e',0};
HKEY hkey = NULL;
MSIEXTENSION *ext;
MSIRECORD *uirow;
@ -1361,7 +1338,6 @@ UINT ACTION_RegisterExtensionInfo(MSIPACKAGE *package)
msi_ui_actiondata( package, szRegisterExtensionInfo, uirow );
msiobj_release(&uirow->hdr);
}
return ERROR_SUCCESS;
}
@ -1447,14 +1423,12 @@ UINT ACTION_UnregisterExtensionInfo( MSIPACKAGE *package )
msi_ui_actiondata( package, szUnregisterExtensionInfo, uirow );
msiobj_release( &uirow->hdr );
}
return ERROR_SUCCESS;
}
UINT ACTION_RegisterMIMEInfo(MSIPACKAGE *package)
{
static const WCHAR szExten[] =
{'E','x','t','e','n','s','i','o','n',0 };
static const WCHAR szExtension[] = {'E','x','t','e','n','s','i','o','n',0};
MSIRECORD *uirow;
MSIMIME *mt;
@ -1462,8 +1436,7 @@ UINT ACTION_RegisterMIMEInfo(MSIPACKAGE *package)
LIST_FOR_EACH_ENTRY( mt, &package->mimes, MSIMIME, entry )
{
LPWSTR extension;
LPWSTR key;
LPWSTR extension, key;
/*
* check if the MIME is to be installed. Either as requested by an
@ -1491,7 +1464,7 @@ UINT ACTION_RegisterMIMEInfo(MSIPACKAGE *package)
strcpyW( key, szMIMEDatabase );
strcatW( key, mt->ContentType );
msi_reg_set_subkey_val( HKEY_CLASSES_ROOT, key, szExten, extension );
msi_reg_set_subkey_val( HKEY_CLASSES_ROOT, key, szExtension, extension );
if (mt->clsid)
msi_reg_set_subkey_val( HKEY_CLASSES_ROOT, key, szCLSID, mt->clsid );
@ -1505,7 +1478,6 @@ UINT ACTION_RegisterMIMEInfo(MSIPACKAGE *package)
msi_ui_actiondata( package, szRegisterMIMEInfo, uirow );
msiobj_release( &uirow->hdr );
}
return ERROR_SUCCESS;
}
@ -1550,6 +1522,5 @@ UINT ACTION_UnregisterMIMEInfo( MSIPACKAGE *package )
msi_ui_actiondata( package, szUnregisterMIMEInfo, uirow );
msiobj_release( &uirow->hdr );
}
return ERROR_SUCCESS;
}

View file

@ -1186,18 +1186,16 @@ static UINT HANDLE_CustomType53_54(MSIPACKAGE *package, LPCWSTR source,
UINT ACTION_CustomAction(MSIPACKAGE *package, LPCWSTR action, UINT script, BOOL execute)
{
static const WCHAR query[] = {
'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ',
'`','C','u','s','t','o','m','A','c','t','i','o','n','`',' ','W','H','E','R','E',' ',
'`','A','c','t','i' ,'o','n','`',' ','=',' ','\'','%','s','\'',0};
UINT rc = ERROR_SUCCESS;
MSIRECORD * row = 0;
static const WCHAR ExecSeqQuery[] =
{'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ',
'`','C','u','s','t','o' ,'m','A','c','t','i','o','n','`',
' ','W','H','E','R','E',' ','`','A','c','t','i' ,'o','n','`',' ',
'=',' ','\'','%','s','\'',0};
MSIRECORD *row;
UINT type;
LPCWSTR source, target;
LPWSTR ptr, deferred_data = NULL;
LPWSTR action_copy = strdupW(action);
WCHAR *deformated=NULL;
LPWSTR deformated = NULL, action_copy = strdupW(action);
/* deferred action: [properties]Action */
if ((ptr = strrchrW(action_copy, ']')))
@ -1206,7 +1204,7 @@ UINT ACTION_CustomAction(MSIPACKAGE *package, LPCWSTR action, UINT script, BOOL
action = ptr + 1;
}
row = MSI_QueryGetRecord( package->db, ExecSeqQuery, action );
row = MSI_QueryGetRecord( package->db, query, action );
if (!row)
{
msi_free(action_copy);

View file

@ -1877,12 +1877,12 @@ done:
static UINT gather_merge_data(MSIDATABASE *db, MSIDATABASE *merge,
struct list *tabledata)
{
UINT r;
static const WCHAR query[] = {
'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ',
'`','_','T','a','b','l','e','s','`',0};
MSIQUERY *view;
MERGEDATA data;
static const WCHAR query[] = {'S','E','L','E','C','T',' ','*',' ',
'F','R','O','M',' ','`','_','T','a','b','l','e','s','`',0};
UINT r;
r = MSI_DatabaseOpenViewW(merge, query, &view);
if (r != ERROR_SUCCESS)
@ -1892,7 +1892,6 @@ static UINT gather_merge_data(MSIDATABASE *db, MSIDATABASE *merge,
data.merge = merge;
data.tabledata = tabledata;
r = MSI_IterateRecords(view, NULL, merge_diff_tables, &data);
msiobj_release(&view->hdr);
return r;
}

View file

@ -369,11 +369,10 @@ static UINT msi_dialog_set_font( msi_dialog *dialog, HWND hwnd, LPCWSTR name )
static UINT msi_dialog_build_font_list( msi_dialog *dialog )
{
static const WCHAR query[] = {
'S','E','L','E','C','T',' ','*',' ',
'F','R','O','M',' ','`','T','e','x','t','S','t','y','l','e','`',' ',0
};
'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ',
'`','T','e','x','t','S','t','y','l','e','`',0};
MSIQUERY *view;
UINT r;
MSIQUERY *view = NULL;
TRACE("dialog %p\n", dialog );
@ -938,12 +937,12 @@ static UINT msi_dialog_control_event( MSIRECORD *rec, LPVOID param )
static UINT msi_dialog_button_handler( msi_dialog *dialog, msi_control *control, WPARAM param )
{
static const WCHAR query[] = {
'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ',
'C','o','n','t','r','o','l','E','v','e','n','t',' ','W','H','E','R','E',' ',
'`','D','i','a','l','o','g','_','`',' ','=',' ','\'','%','s','\'',' ','A','N','D',' ',
'`','C','o','n','t','r','o','l','_','`',' ','=',' ','\'','%','s','\'',' ',
'O','R','D','E','R',' ','B','Y',' ','`','O','r','d','e','r','i','n','g','`',0};
MSIQUERY *view = NULL;
'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ',
'C','o','n','t','r','o','l','E','v','e','n','t',' ','W','H','E','R','E',' ',
'`','D','i','a','l','o','g','_','`',' ','=',' ','\'','%','s','\'',' ','A','N','D',' ',
'`','C','o','n','t','r','o','l','_','`',' ','=',' ','\'','%','s','\'',' ',
'O','R','D','E','R',' ','B','Y',' ','`','O','r','d','e','r','i','n','g','`',0};
MSIQUERY *view;
UINT r;
if (HIWORD(param) != BN_CLICKED)
@ -953,9 +952,8 @@ static UINT msi_dialog_button_handler( msi_dialog *dialog, msi_control *control,
if (r != ERROR_SUCCESS)
{
ERR("query failed\n");
return 0;
return ERROR_SUCCESS;
}
r = MSI_IterateRecords( view, 0, msi_dialog_control_event, dialog );
msiobj_release( &view->hdr );
return r;
@ -1472,17 +1470,14 @@ static UINT msi_combobox_add_item( MSIRECORD *rec, LPVOID param )
static UINT msi_combobox_add_items( struct msi_combobox_info *info, LPCWSTR property )
{
UINT r;
MSIQUERY *view = NULL;
DWORD count;
static const WCHAR query[] = {
'S','E','L','E','C','T',' ','*',' ',
'F','R','O','M',' ','`','C','o','m','b','o','B','o','x','`',' ',
'W','H','E','R','E',' ',
'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ',
'`','C','o','m','b','o','B','o','x','`',' ','W','H','E','R','E',' ',
'`','P','r','o','p','e','r','t','y','`',' ','=',' ','\'','%','s','\'',' ',
'O','R','D','E','R',' ','B','Y',' ','`','O','r','d','e','r','`',0
};
'O','R','D','E','R',' ','B','Y',' ','`','O','r','d','e','r','`',0};
MSIQUERY *view;
DWORD count;
UINT r;
r = MSI_OpenQuery( info->dialog->package->db, &view, query, property );
if (r != ERROR_SUCCESS)
@ -1545,11 +1540,11 @@ static UINT msi_dialog_set_control_condition( MSIRECORD *rec, LPVOID param )
static UINT msi_dialog_evaluate_control_conditions( msi_dialog *dialog )
{
static const WCHAR query[] = {
'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ',
'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ',
'C','o','n','t','r','o','l','C','o','n','d','i','t','i','o','n',' ',
'W','H','E','R','E',' ','`','D','i','a','l','o','g','_','`',' ','=',' ','\'','%','s','\'',0};
'W','H','E','R','E',' ','`','D','i','a','l','o','g','_','`',' ','=',' ','\'','%','s','\'',0};
UINT r;
MSIQUERY *view = NULL;
MSIQUERY *view;
MSIPACKAGE *package = dialog->package;
TRACE("%p %s\n", dialog, debugstr_w(dialog->name));
@ -2274,14 +2269,13 @@ static LRESULT WINAPI MSIRadioGroup_WndProc( HWND hWnd, UINT msg, WPARAM wParam,
static UINT msi_dialog_radiogroup_control( msi_dialog *dialog, MSIRECORD *rec )
{
static const WCHAR query[] = {
'S','E','L','E','C','T',' ','*',' ',
'F','R','O','M',' ','R','a','d','i','o','B','u','t','t','o','n',' ',
'W','H','E','R','E',' ',
'`','P','r','o','p','e','r','t','y','`',' ','=',' ','\'','%','s','\'',0};
'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ',
'R','a','d','i','o','B','u','t','t','o','n',' ','W','H','E','R','E',' ',
'`','P','r','o','p','e','r','t','y','`',' ','=',' ','\'','%','s','\'',0};
UINT r;
LPCWSTR prop;
msi_control *control;
MSIQUERY *view = NULL;
MSIQUERY *view;
radio_button_group_descr group;
MSIPACKAGE *package = dialog->package;
WNDPROC oldproc;
@ -2760,17 +2754,14 @@ static UINT msi_listbox_add_item( MSIRECORD *rec, LPVOID param )
static UINT msi_listbox_add_items( struct msi_listbox_info *info, LPCWSTR property )
{
UINT r;
MSIQUERY *view = NULL;
DWORD count;
static const WCHAR query[] = {
'S','E','L','E','C','T',' ','*',' ',
'F','R','O','M',' ','`','L','i','s','t','B','o','x','`',' ',
'W','H','E','R','E',' ',
'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ',
'`','L','i','s','t','B','o','x','`',' ','W','H','E','R','E',' ',
'`','P','r','o','p','e','r','t','y','`',' ','=',' ','\'','%','s','\'',' ',
'O','R','D','E','R',' ','B','Y',' ','`','O','r','d','e','r','`',0
};
'O','R','D','E','R',' ','B','Y',' ','`','O','r','d','e','r','`',0};
MSIQUERY *view;
DWORD count;
UINT r;
r = MSI_OpenQuery( info->dialog->package->db, &view, query, property );
if ( r != ERROR_SUCCESS )
@ -3359,12 +3350,11 @@ static UINT msi_dialog_create_controls( MSIRECORD *rec, LPVOID param )
static UINT msi_dialog_fill_controls( msi_dialog *dialog )
{
static const WCHAR query[] = {
'S','E','L','E','C','T',' ','*',' ',
'F','R','O','M',' ','C','o','n','t','r','o','l',' ',
'W','H','E','R','E',' ',
'`','D','i','a','l','o','g','_','`',' ','=',' ','\'','%','s','\'',0};
'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ',
'C','o','n','t','r','o','l',' ','W','H','E','R','E',' ',
'`','D','i','a','l','o','g','_','`',' ','=',' ','\'','%','s','\'',0};
UINT r;
MSIQUERY *view = NULL;
MSIQUERY *view;
MSIPACKAGE *package = dialog->package;
TRACE("%p %s\n", dialog, debugstr_w(dialog->name) );

View file

@ -880,20 +880,18 @@ done:
UINT ACTION_MoveFiles( MSIPACKAGE *package )
{
UINT rc;
static const WCHAR query[] = {
'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ',
'`','M','o','v','e','F','i','l','e','`',0};
MSIQUERY *view;
UINT rc;
static const WCHAR ExecSeqQuery[] =
{'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ',
'`','M','o','v','e','F','i','l','e','`',0};
rc = MSI_DatabaseOpenViewW(package->db, ExecSeqQuery, &view);
rc = MSI_DatabaseOpenViewW(package->db, query, &view);
if (rc != ERROR_SUCCESS)
return ERROR_SUCCESS;
rc = MSI_IterateRecords(view, NULL, ITERATE_MoveFiles, package);
msiobj_release(&view->hdr);
return rc;
}
@ -1014,19 +1012,18 @@ static UINT ITERATE_DuplicateFiles(MSIRECORD *row, LPVOID param)
UINT ACTION_DuplicateFiles(MSIPACKAGE *package)
{
static const WCHAR query[] = {
'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ',
'`','D','u','p','l','i','c','a','t','e','F','i','l','e','`',0};
MSIQUERY *view;
UINT rc;
MSIQUERY * view;
static const WCHAR ExecSeqQuery[] =
{'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ',
'`','D','u','p','l','i','c','a','t','e','F','i','l','e','`',0};
rc = MSI_DatabaseOpenViewW(package->db, ExecSeqQuery, &view);
rc = MSI_DatabaseOpenViewW(package->db, query, &view);
if (rc != ERROR_SUCCESS)
return ERROR_SUCCESS;
rc = MSI_IterateRecords(view, NULL, ITERATE_DuplicateFiles, package);
msiobj_release(&view->hdr);
return rc;
}
@ -1091,11 +1088,11 @@ static UINT ITERATE_RemoveDuplicateFiles( MSIRECORD *row, LPVOID param )
UINT ACTION_RemoveDuplicateFiles( MSIPACKAGE *package )
{
UINT rc;
static const WCHAR query[] = {
'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ',
'`','D','u','p','l','i','c','a','t','e','F','i','l','e','`',0};
MSIQUERY *view;
static const WCHAR query[] =
{'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ',
'`','D','u','p','l','i','c','a','t','e','F','i','l','e','`',0};
UINT rc;
rc = MSI_DatabaseOpenViewW( package->db, query, &view );
if (rc != ERROR_SUCCESS)
@ -1103,7 +1100,6 @@ UINT ACTION_RemoveDuplicateFiles( MSIPACKAGE *package )
rc = MSI_IterateRecords( view, NULL, ITERATE_RemoveDuplicateFiles, package );
msiobj_release( &view->hdr );
return rc;
}
@ -1228,9 +1224,9 @@ static void remove_folder( MSIFOLDER *folder )
UINT ACTION_RemoveFiles( MSIPACKAGE *package )
{
static const WCHAR query[] =
{'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ',
'`','R','e','m','o','v','e','F','i','l','e','`',0};
static const WCHAR query[] = {
'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ',
'`','R','e','m','o','v','e','F','i','l','e','`',0};
MSIQUERY *view;
MSICOMPONENT *comp;
MSIFILE *file;

View file

@ -266,22 +266,17 @@ static UINT ITERATE_RegisterFonts(MSIRECORD *row, LPVOID param)
UINT ACTION_RegisterFonts(MSIPACKAGE *package)
{
static const WCHAR query[] = {
'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ','`','F','o','n','t','`',0};
MSIQUERY *view;
UINT rc;
MSIQUERY * view;
static const WCHAR ExecSeqQuery[] =
{'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ',
'`','F','o','n','t','`',0};
rc = MSI_DatabaseOpenViewW(package->db, ExecSeqQuery, &view);
rc = MSI_DatabaseOpenViewW(package->db, query, &view);
if (rc != ERROR_SUCCESS)
{
TRACE("MSI_DatabaseOpenViewW failed: %d\n", rc);
return ERROR_SUCCESS;
}
MSI_IterateRecords(view, NULL, ITERATE_RegisterFonts, package);
msiobj_release(&view->hdr);
return ERROR_SUCCESS;
}
@ -351,21 +346,16 @@ static UINT ITERATE_UnregisterFonts( MSIRECORD *row, LPVOID param )
UINT ACTION_UnregisterFonts( MSIPACKAGE *package )
{
UINT r;
static const WCHAR query[] = {
'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ','`','F','o','n','t','`',0};
MSIQUERY *view;
static const WCHAR query[] =
{'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ',
'`','F','o','n','t','`',0};
UINT r;
r = MSI_DatabaseOpenViewW( package->db, query, &view );
if (r != ERROR_SUCCESS)
{
TRACE("MSI_DatabaseOpenViewW failed: %u\n", r);
return ERROR_SUCCESS;
}
MSI_IterateRecords( view, NULL, ITERATE_UnregisterFonts, package );
msiobj_release( &view->hdr );
return ERROR_SUCCESS;
}

View file

@ -119,7 +119,7 @@ UINT WINAPI MsiSequenceA( MSIHANDLE hInstall, LPCSTR szTable, INT iSequenceMode
LPWSTR szwTable;
UINT ret;
TRACE("%s\n", debugstr_a(szTable));
TRACE("%s, %d\n", debugstr_a(szTable), iSequenceMode);
szwTable = strdupAtoW(szTable);
if (szTable && !szwTable)
@ -138,7 +138,7 @@ UINT WINAPI MsiSequenceW( MSIHANDLE hInstall, LPCWSTR szTable, INT iSequenceMode
MSIPACKAGE *package;
UINT ret;
TRACE("%s\n", debugstr_w(szTable));
TRACE("%s, %d\n", debugstr_w(szTable), iSequenceMode);
package = msihandle2msiinfo( hInstall, MSIHANDLETYPE_PACKAGE );
if (!package)
@ -173,10 +173,8 @@ UINT WINAPI MsiSequenceW( MSIHANDLE hInstall, LPCWSTR szTable, INT iSequenceMode
return ERROR_SUCCESS;
}
ret = MSI_Sequence( package, szTable, iSequenceMode );
ret = MSI_Sequence( package, szTable );
msiobj_release( &package->hdr );
return ret;
}

View file

@ -774,7 +774,7 @@ extern UINT msi_apply_registered_patch( MSIPACKAGE *package, LPCWSTR patch_code
extern UINT MSI_InstallPackage( MSIPACKAGE *, LPCWSTR, LPCWSTR ) DECLSPEC_HIDDEN;
extern UINT ACTION_DialogBox( MSIPACKAGE*, LPCWSTR) DECLSPEC_HIDDEN;
extern UINT ACTION_ForceReboot(MSIPACKAGE *package) DECLSPEC_HIDDEN;
extern UINT MSI_Sequence( MSIPACKAGE *package, LPCWSTR szTable, INT iSequenceMode ) DECLSPEC_HIDDEN;
extern UINT MSI_Sequence( MSIPACKAGE *package, LPCWSTR szTable ) DECLSPEC_HIDDEN;
extern UINT MSI_SetFeatureStates( MSIPACKAGE *package ) DECLSPEC_HIDDEN;
extern UINT msi_parse_command_line( MSIPACKAGE *package, LPCWSTR szCommandLine, BOOL preserve_case ) DECLSPEC_HIDDEN;
extern UINT msi_schedule_action( MSIPACKAGE *package, UINT script, const WCHAR *action ) DECLSPEC_HIDDEN;

View file

@ -367,21 +367,20 @@ static void MSI_FreePackage( MSIOBJECTHDR *arg)
static UINT create_temp_property_table(MSIPACKAGE *package)
{
MSIQUERY *view = NULL;
static const WCHAR query[] = {
'C','R','E','A','T','E',' ','T','A','B','L','E',' ',
'`','_','P','r','o','p','e','r','t','y','`',' ','(',' ',
'`','_','P','r','o','p','e','r','t','y','`',' ',
'C','H','A','R','(','5','6',')',' ','N','O','T',' ','N','U','L','L',' ',
'T','E','M','P','O','R','A','R','Y',',',' ',
'`','V','a','l','u','e','`',' ','C','H','A','R','(','9','8',')',' ',
'N','O','T',' ','N','U','L','L',' ','T','E','M','P','O','R','A','R','Y',
' ','P','R','I','M','A','R','Y',' ','K','E','Y',' ',
'`','_','P','r','o','p','e','r','t','y','`',')',' ','H','O','L','D',0};
MSIQUERY *view;
UINT rc;
static const WCHAR CreateSql[] = {
'C','R','E','A','T','E',' ','T','A','B','L','E',' ',
'`','_','P','r','o','p','e','r','t','y','`',' ','(',' ',
'`','_','P','r','o','p','e','r','t','y','`',' ',
'C','H','A','R','(','5','6',')',' ','N','O','T',' ','N','U','L','L',' ',
'T','E','M','P','O','R','A','R','Y',',',' ',
'`','V','a','l','u','e','`',' ','C','H','A','R','(','9','8',')',' ',
'N','O','T',' ','N','U','L','L',' ','T','E','M','P','O','R','A','R','Y',
' ','P','R','I','M','A','R','Y',' ','K','E','Y',' ',
'`','_','P','r','o','p','e','r','t','y','`',')',' ','H','O','L','D',0};
rc = MSI_DatabaseOpenViewW(package->db, CreateSql, &view);
rc = MSI_DatabaseOpenViewW(package->db, query, &view);
if (rc != ERROR_SUCCESS)
return rc;
@ -393,22 +392,20 @@ static UINT create_temp_property_table(MSIPACKAGE *package)
UINT msi_clone_properties(MSIPACKAGE *package)
{
MSIQUERY *view_select = NULL;
UINT rc;
static const WCHAR query_select[] = {
'S','E','L','E','C','T',' ','*',' ',
'F','R','O','M',' ','`','P','r','o','p','e','r','t','y','`',0};
'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ',
'`','P','r','o','p','e','r','t','y','`',0};
static const WCHAR query_insert[] = {
'I','N','S','E','R','T',' ','i','n','t','o',' ',
'`','_','P','r','o','p','e','r','t','y','`',' ',
'(','`','_','P','r','o','p','e','r','t','y','`',',',
'`','V','a','l','u','e','`',')',' ',
'V','A','L','U','E','S',' ','(','?',',','?',')',0};
'I','N','S','E','R','T',' ','I','N','T','O',' ',
'`','_','P','r','o','p','e','r','t','y','`',' ',
'(','`','_','P','r','o','p','e','r','t','y','`',',','`','V','a','l','u','e','`',')',' ',
'V','A','L','U','E','S',' ','(','?',',','?',')',0};
static const WCHAR query_update[] = {
'U','P','D','A','T','E',' ','`','_','P','r','o','p','e','r','t','y','`',' ',
'S','E','T',' ','`','V','a','l','u','e','`',' ','=',' ','?',' ',
'W','H','E','R','E',' ','`','_','P','r','o','p','e','r','t','y','`',' ','=',' ','?',0};
MSIQUERY *view_select;
UINT rc;
rc = MSI_DatabaseOpenViewW( package->db, query_select, &view_select );
if (rc != ERROR_SUCCESS)
@ -1934,27 +1931,24 @@ void msi_reset_folders( MSIPACKAGE *package, BOOL source )
UINT msi_set_property( MSIDATABASE *db, LPCWSTR szName, LPCWSTR szValue )
{
MSIQUERY *view;
MSIRECORD *row = NULL;
UINT rc;
DWORD sz = 0;
WCHAR Query[1024];
static const WCHAR Insert[] = {
'I','N','S','E','R','T',' ','i','n','t','o',' ',
'`','_','P','r','o','p','e','r','t','y','`',' ','(',
'`','_','P','r','o','p','e','r','t','y','`',',',
'`','V','a','l','u','e','`',')',' ','V','A','L','U','E','S'
,' ','(','?',',','?',')',0};
static const WCHAR Update[] = {
'U','P','D','A','T','E',' ','`','_','P','r','o','p','e','r','t','y','`',
' ','s','e','t',' ','`','V','a','l','u','e','`',' ','=',' ','?',' ',
'w','h','e','r','e',' ','`','_','P','r','o','p','e','r','t','y','`',
' ','=',' ','\'','%','s','\'',0};
static const WCHAR Delete[] = {
static const WCHAR insert_query[] = {
'I','N','S','E','R','T',' ','I','N','T','O',' ',
'`','_','P','r','o','p','e','r','t','y','`',' ',
'(','`','_','P','r','o','p','e','r','t','y','`',',','`','V','a','l','u','e','`',')',' ',
'V','A','L','U','E','S',' ','(','?',',','?',')',0};
static const WCHAR update_query[] = {
'U','P','D','A','T','E',' ','`','_','P','r','o','p','e','r','t','y','`',' ',
'S','E','T',' ','`','V','a','l','u','e','`',' ','=',' ','?',' ','W','H','E','R','E',' ',
'`','_','P','r','o','p','e','r','t','y','`',' ','=',' ','\'','%','s','\'',0};
static const WCHAR delete_query[] = {
'D','E','L','E','T','E',' ','F','R','O','M',' ',
'`','_','P','r','o','p','e','r','t','y','`',' ','W','H','E','R','E',' ',
'`','_','P','r','o','p','e','r','t','y','`',' ','=',' ','\'','%','s','\'',0};
MSIQUERY *view;
MSIRECORD *row = NULL;
DWORD sz = 0;
WCHAR query[1024];
UINT rc;
TRACE("%p %s %s\n", db, debugstr_w(szName), debugstr_w(szValue));
@ -1968,35 +1962,32 @@ UINT msi_set_property( MSIDATABASE *db, LPCWSTR szName, LPCWSTR szValue )
rc = msi_get_property(db, szName, 0, &sz);
if (!szValue || !*szValue)
{
sprintfW(Query, Delete, szName);
sprintfW(query, delete_query, szName);
}
else if (rc == ERROR_MORE_DATA || rc == ERROR_SUCCESS)
{
sprintfW(Query, Update, szName);
sprintfW(query, update_query, szName);
row = MSI_CreateRecord(1);
MSI_RecordSetStringW(row, 1, szValue);
}
else
{
strcpyW(Query, Insert);
strcpyW(query, insert_query);
row = MSI_CreateRecord(2);
MSI_RecordSetStringW(row, 1, szName);
MSI_RecordSetStringW(row, 2, szValue);
}
rc = MSI_DatabaseOpenViewW(db, Query, &view);
rc = MSI_DatabaseOpenViewW(db, query, &view);
if (rc == ERROR_SUCCESS)
{
rc = MSI_ViewExecute(view, row);
MSI_ViewClose(view);
msiobj_release(&view->hdr);
}
if (row)
msiobj_release(&row->hdr);
if (row) msiobj_release(&row->hdr);
return rc;
}
@ -2053,15 +2044,13 @@ UINT WINAPI MsiSetPropertyW( MSIHANDLE hInstall, LPCWSTR szName, LPCWSTR szValue
static MSIRECORD *msi_get_property_row( MSIDATABASE *db, LPCWSTR name )
{
MSIQUERY *view;
MSIRECORD *rec, *row = NULL;
UINT r;
static const WCHAR query[]= {
'S','E','L','E','C','T',' ','`','V','a','l','u','e','`',' ',
'F','R','O','M',' ' ,'`','_','P','r','o','p','e','r','t','y','`',
' ','W','H','E','R','E',' ' ,'`','_','P','r','o','p','e','r','t','y','`',
'=','?',0};
'F','R','O','M',' ' ,'`','_','P','r','o','p','e','r','t','y','`',' ',
'W','H','E','R','E',' ' ,'`','_','P','r','o','p','e','r','t','y','`','=','?',0};
MSIRECORD *rec, *row = NULL;
MSIQUERY *view;
UINT r;
if (!name || !*name)
return NULL;
@ -2080,7 +2069,6 @@ static MSIRECORD *msi_get_property_row( MSIDATABASE *db, LPCWSTR name )
MSI_ViewClose(view);
msiobj_release(&view->hdr);
}
msiobj_release(&rec->hdr);
return row;
}

View file

@ -266,7 +266,7 @@ static void patch_offset_list_free( struct patch_offset_list *pos )
static void patch_offset_get_patches( MSIDATABASE *db, UINT last_sequence, struct patch_offset_list *pos )
{
static const WCHAR query_patch[] = {
static const WCHAR query[] = {
'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ','P','a','t','c','h',' ',
'W','H','E','R','E',' ','S','e','q','u','e','n','c','e',' ','<','=',' ','?',' ',
'O','R','D','E','R',' ','B','Y',' ','S','e','q','u','e','n','c','e',0};
@ -274,7 +274,7 @@ static void patch_offset_get_patches( MSIDATABASE *db, UINT last_sequence, struc
MSIRECORD *rec;
UINT r;
r = MSI_DatabaseOpenViewW( db, query_patch, &view );
r = MSI_DatabaseOpenViewW( db, query, &view );
if (r != ERROR_SUCCESS)
return;
@ -301,7 +301,7 @@ static void patch_offset_get_patches( MSIDATABASE *db, UINT last_sequence, struc
static void patch_offset_get_files( MSIDATABASE *db, UINT last_sequence, struct patch_offset_list *pos )
{
static const WCHAR query_files[] = {
static const WCHAR query[] = {
'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ','F','i','l','e',' ',
'W','H','E','R','E',' ','S','e','q','u','e','n','c','e',' ','<','=',' ','?',' ',
'O','R','D','E','R',' ','B','Y',' ','S','e','q','u','e','n','c','e',0};
@ -309,7 +309,7 @@ static void patch_offset_get_files( MSIDATABASE *db, UINT last_sequence, struct
MSIRECORD *rec;
UINT r;
r = MSI_DatabaseOpenViewW( db, query_files, &view );
r = MSI_DatabaseOpenViewW( db, query, &view );
if (r != ERROR_SUCCESS)
return;
@ -342,7 +342,7 @@ static void patch_offset_get_files( MSIDATABASE *db, UINT last_sequence, struct
static UINT patch_offset_modify_db( MSIDATABASE *db, struct patch_offset_list *pos )
{
static const WCHAR query_files[] = {
static const WCHAR query[] = {
'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ','F','i','l','e',' ',
'W','H','E','R','E',' ','S','e','q','u','e','n','c','e',' ','>','=',' ','?',' ',
'A','N','D',' ','S','e','q','u','e','n','c','e',' ','<','=',' ','?',' ',
@ -352,7 +352,7 @@ static UINT patch_offset_modify_db( MSIDATABASE *db, struct patch_offset_list *p
MSIQUERY *view;
UINT r;
r = MSI_DatabaseOpenViewW( db, query_files, &view );
r = MSI_DatabaseOpenViewW( db, query, &view );
if (r != ERROR_SUCCESS)
return ERROR_SUCCESS;

View file

@ -1237,16 +1237,14 @@ static UINT TABLE_get_row( struct tagMSIVIEW *view, UINT row, MSIRECORD **rec )
static UINT msi_addstreamW( MSIDATABASE *db, LPCWSTR name, IStream *data )
{
UINT r;
MSIQUERY *query = NULL;
MSIRECORD *rec = NULL;
static const WCHAR insert[] = {
'I','N','S','E','R','T',' ','I','N','T','O',' ',
'`','_','S','t','r','e','a','m','s','`',' ',
'(','`','N','a','m','e','`',',',
'`','D','a','t','a','`',')',' ',
'V','A','L','U','E','S',' ','(','?',',','?',')',0};
'I','N','S','E','R','T',' ','I','N','T','O',' ',
'`','_','S','t','r','e','a','m','s','`',' ',
'(','`','N','a','m','e','`',',','`','D','a','t','a','`',')',' ',
'V','A','L','U','E','S',' ','(','?',',','?',')',0};
MSIQUERY *query = NULL;
MSIRECORD *rec;
UINT r;
TRACE("%p %s %p\n", db, debugstr_w(name), data);
@ -1271,7 +1269,6 @@ static UINT msi_addstreamW( MSIDATABASE *db, LPCWSTR name, IStream *data )
err:
msiobj_release( &query->hdr );
msiobj_release( &rec->hdr );
return r;
}

View file

@ -205,18 +205,17 @@ static UINT ITERATE_FindRelatedProducts(MSIRECORD *rec, LPVOID param)
UINT ACTION_FindRelatedProducts(MSIPACKAGE *package)
{
static const WCHAR Query[] =
{'S','E','L','E','C','T',' ','*',' ','F','R','O','M',
' ','`','U','p','g','r','a','d','e','`',0};
UINT rc = ERROR_SUCCESS;
static const WCHAR query[] = {
'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ',
'`','U','p','g','r','a','d','e','`',0};
MSIQUERY *view;
UINT rc;
if (msi_get_property_int(package->db, szInstalled, 0))
{
TRACE("Skipping FindRelatedProducts action: product already installed\n");
return ERROR_SUCCESS;
}
if (msi_action_is_unique(package, szFindRelatedProducts))
{
TRACE("Skipping FindRelatedProducts action: already done in UI sequence\n");
@ -225,12 +224,11 @@ UINT ACTION_FindRelatedProducts(MSIPACKAGE *package)
else
msi_register_unique_action(package, szFindRelatedProducts);
rc = MSI_DatabaseOpenViewW(package->db, Query, &view);
rc = MSI_DatabaseOpenViewW(package->db, query, &view);
if (rc != ERROR_SUCCESS)
return ERROR_SUCCESS;
rc = MSI_IterateRecords(view, NULL, ITERATE_FindRelatedProducts, package);
msiobj_release(&view->hdr);
return rc;
}