Commit b64fabf3 authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

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

parent df6c2a84
......@@ -635,14 +635,12 @@ static UINT ACTION_ProcessUISequence(MSIPACKAGE *package)
/********************************************************
* ACTION helper functions and functions that perform the actions
*******************************************************/
static BOOL ACTION_HandleCustomAction( MSIPACKAGE* package, LPCWSTR action,
UINT* rc, UINT script, BOOL force )
static BOOL ACTION_HandleCustomAction( MSIPACKAGE *package, LPCWSTR action, UINT *rc, UINT script )
{
BOOL ret=FALSE;
UINT arc;
arc = ACTION_CustomAction(package, action, script, force);
arc = ACTION_CustomAction( package, action, script );
if (arc != ERROR_CALL_NOT_IMPLEMENTED)
{
*rc = arc;
......@@ -7650,7 +7648,7 @@ UINT ACTION_PerformAction(MSIPACKAGE *package, const WCHAR *action, UINT script)
handled = ACTION_HandleStandardAction(package, action, &rc);
if (!handled)
handled = ACTION_HandleCustomAction(package, action, &rc, script, TRUE);
handled = ACTION_HandleCustomAction(package, action, &rc, script);
if (!handled)
{
......@@ -7672,7 +7670,7 @@ UINT ACTION_PerformUIAction(MSIPACKAGE *package, const WCHAR *action, UINT scrip
handled = ACTION_HandleStandardAction(package, action, &rc);
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 )
handled = TRUE;
......
......@@ -1172,7 +1172,7 @@ static UINT defer_custom_action( MSIPACKAGE *package, const WCHAR *action, UINT
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[] = {
'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)
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 );
goto end;
......
......@@ -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_PerformUIAction(MSIPACKAGE *package, const WCHAR *action, UINT script) 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 */
extern UINT ACTION_AppSearch(MSIPACKAGE *package) DECLSPEC_HIDDEN;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment