Commit 4f634a3b authored by Mike McCormack's avatar Mike McCormack Committed by Alexandre Julliard

Stop the install when cancelling from a modeless dialog.

parent 50f8fbf1
...@@ -674,6 +674,11 @@ static UINT ITERATE_Actions(MSIRECORD *row, LPVOID param) ...@@ -674,6 +674,11 @@ static UINT ITERATE_Actions(MSIRECORD *row, LPVOID param)
else else
rc = ACTION_PerformAction(iap->package,action,FALSE); rc = ACTION_PerformAction(iap->package,action,FALSE);
msi_dialog_check_messages( NULL );
if (iap->package->CurrentInstallState != ERROR_SUCCESS )
rc = iap->package->CurrentInstallState;
if (rc == ERROR_FUNCTION_NOT_CALLED) if (rc == ERROR_FUNCTION_NOT_CALLED)
rc = ERROR_SUCCESS; rc = ERROR_SUCCESS;
...@@ -822,18 +827,6 @@ static BOOL ACTION_HandleStandardAction(MSIPACKAGE *package, LPCWSTR action, ...@@ -822,18 +827,6 @@ static BOOL ACTION_HandleStandardAction(MSIPACKAGE *package, LPCWSTR action,
return ret; return ret;
} }
static BOOL ACTION_HandleDialogBox( MSIPACKAGE *package, LPCWSTR dialog, UINT* rc )
{
BOOL ret = FALSE;
if (ACTION_DialogBox(package,dialog) == ERROR_SUCCESS)
{
*rc = package->CurrentInstallState;
ret = TRUE;
}
return ret;
}
static BOOL ACTION_HandleCustomAction( MSIPACKAGE* package, LPCWSTR action, static BOOL ACTION_HandleCustomAction( MSIPACKAGE* package, LPCWSTR action,
UINT* rc, BOOL force ) UINT* rc, BOOL force )
{ {
...@@ -876,7 +869,6 @@ UINT ACTION_PerformAction(MSIPACKAGE *package, const WCHAR *action, BOOL force) ...@@ -876,7 +869,6 @@ UINT ACTION_PerformAction(MSIPACKAGE *package, const WCHAR *action, BOOL force)
rc = ERROR_FUNCTION_NOT_CALLED; rc = ERROR_FUNCTION_NOT_CALLED;
} }
package->CurrentInstallState = rc;
return rc; return rc;
} }
...@@ -892,10 +884,8 @@ UINT ACTION_PerformUIAction(MSIPACKAGE *package, const WCHAR *action) ...@@ -892,10 +884,8 @@ UINT ACTION_PerformUIAction(MSIPACKAGE *package, const WCHAR *action)
if (!handled) if (!handled)
handled = ACTION_HandleCustomAction(package, action, &rc, FALSE); handled = ACTION_HandleCustomAction(package, action, &rc, FALSE);
if (!handled) if( !handled && ACTION_DialogBox(package,action) == ERROR_SUCCESS )
handled = ACTION_HandleDialogBox(package, action, &rc); handled = TRUE;
msi_dialog_check_messages( NULL );
if (!handled) if (!handled)
{ {
...@@ -903,7 +893,6 @@ UINT ACTION_PerformUIAction(MSIPACKAGE *package, const WCHAR *action) ...@@ -903,7 +893,6 @@ UINT ACTION_PerformUIAction(MSIPACKAGE *package, const WCHAR *action)
rc = ERROR_FUNCTION_NOT_CALLED; rc = ERROR_FUNCTION_NOT_CALLED;
} }
package->CurrentInstallState = rc;
return rc; return rc;
} }
......
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