msi: Don't defer custom actions in the UI sequence if they match the currently running script.

This commit is contained in:
Hans Leidekker 2013-06-03 12:09:54 +02:00 committed by Alexandre Julliard
parent df6c2a8418
commit b64fabf39e
3 changed files with 7 additions and 9 deletions

View File

@ -635,14 +635,12 @@ static UINT ACTION_ProcessUISequence(MSIPACKAGE *package)
/******************************************************** /********************************************************
* ACTION helper functions and functions that perform the actions * ACTION helper functions and functions that perform the actions
*******************************************************/ *******************************************************/
static BOOL ACTION_HandleCustomAction( MSIPACKAGE* package, LPCWSTR action, static BOOL ACTION_HandleCustomAction( MSIPACKAGE *package, LPCWSTR action, UINT *rc, UINT script )
UINT* rc, UINT script, BOOL force )
{ {
BOOL ret=FALSE; BOOL ret=FALSE;
UINT arc; UINT arc;
arc = ACTION_CustomAction(package, action, script, force); arc = ACTION_CustomAction( package, action, script );
if (arc != ERROR_CALL_NOT_IMPLEMENTED) if (arc != ERROR_CALL_NOT_IMPLEMENTED)
{ {
*rc = arc; *rc = arc;
@ -7650,7 +7648,7 @@ UINT ACTION_PerformAction(MSIPACKAGE *package, const WCHAR *action, UINT script)
handled = ACTION_HandleStandardAction(package, action, &rc); handled = ACTION_HandleStandardAction(package, action, &rc);
if (!handled) if (!handled)
handled = ACTION_HandleCustomAction(package, action, &rc, script, TRUE); handled = ACTION_HandleCustomAction(package, action, &rc, script);
if (!handled) if (!handled)
{ {
@ -7672,7 +7670,7 @@ UINT ACTION_PerformUIAction(MSIPACKAGE *package, const WCHAR *action, UINT scrip
handled = ACTION_HandleStandardAction(package, action, &rc); handled = ACTION_HandleStandardAction(package, action, &rc);
if (!handled) if (!handled)
handled = ACTION_HandleCustomAction(package, action, &rc, script, FALSE); handled = ACTION_HandleCustomAction(package, action, &rc, script);
if( !handled && ACTION_DialogBox(package, action) == ERROR_SUCCESS ) if( !handled && ACTION_DialogBox(package, action) == ERROR_SUCCESS )
handled = TRUE; handled = TRUE;

View File

@ -1172,7 +1172,7 @@ static UINT defer_custom_action( MSIPACKAGE *package, const WCHAR *action, UINT
return ERROR_SUCCESS; return ERROR_SUCCESS;
} }
UINT ACTION_CustomAction(MSIPACKAGE *package, LPCWSTR action, UINT script, BOOL execute) UINT ACTION_CustomAction( MSIPACKAGE *package, LPCWSTR action, UINT script )
{ {
static const WCHAR query[] = { static const WCHAR query[] = {
'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ', 'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ',
@ -1212,7 +1212,7 @@ UINT ACTION_CustomAction(MSIPACKAGE *package, LPCWSTR action, UINT script, BOOL
if (type & msidbCustomActionTypeNoImpersonate) if (type & msidbCustomActionTypeNoImpersonate)
WARN("msidbCustomActionTypeNoImpersonate not handled\n"); WARN("msidbCustomActionTypeNoImpersonate not handled\n");
if (!execute || !action_type_matches_script( type, script )) if (!action_type_matches_script( type, script ))
{ {
rc = defer_custom_action( package, action, type ); rc = defer_custom_action( package, action, type );
goto end; goto end;

View File

@ -977,7 +977,7 @@ extern HINSTANCE msi_hInstance DECLSPEC_HIDDEN;
extern UINT ACTION_PerformAction(MSIPACKAGE *package, const WCHAR *action, UINT script) DECLSPEC_HIDDEN; extern UINT ACTION_PerformAction(MSIPACKAGE *package, const WCHAR *action, UINT script) DECLSPEC_HIDDEN;
extern UINT ACTION_PerformUIAction(MSIPACKAGE *package, const WCHAR *action, UINT script) DECLSPEC_HIDDEN; extern UINT ACTION_PerformUIAction(MSIPACKAGE *package, const WCHAR *action, UINT script) DECLSPEC_HIDDEN;
extern void ACTION_FinishCustomActions( const MSIPACKAGE* package) DECLSPEC_HIDDEN; extern void ACTION_FinishCustomActions( const MSIPACKAGE* package) DECLSPEC_HIDDEN;
extern UINT ACTION_CustomAction(MSIPACKAGE *package,const WCHAR *action, UINT script, BOOL execute) DECLSPEC_HIDDEN; extern UINT ACTION_CustomAction(MSIPACKAGE *, const WCHAR *, UINT) DECLSPEC_HIDDEN;
/* actions in other modules */ /* actions in other modules */
extern UINT ACTION_AppSearch(MSIPACKAGE *package) DECLSPEC_HIDDEN; extern UINT ACTION_AppSearch(MSIPACKAGE *package) DECLSPEC_HIDDEN;