@@ -517,7 +517,7 @@ static UINT ITERATE_Actions(MSIRECORD *row, LPVOID param)
517517 return ERROR_SUCCESS ;
518518 }
519519
520- rc = ACTION_PerformAction (package , action , SCRIPT_NONE );
520+ rc = ACTION_PerformAction (package , action );
521521
522522 msi_dialog_check_messages ( NULL );
523523
@@ -611,7 +611,7 @@ static UINT ACTION_ProcessUISequence(MSIPACKAGE *package)
611611/********************************************************
612612 * ACTION helper functions and functions that perform the actions
613613 *******************************************************/
614- static UINT ACTION_HandleCustomAction (MSIPACKAGE * package , LPCWSTR action , UINT script )
614+ static UINT ACTION_HandleCustomAction (MSIPACKAGE * package , LPCWSTR action )
615615{
616616 UINT arc ;
617617 INT uirc ;
@@ -620,7 +620,7 @@ static UINT ACTION_HandleCustomAction(MSIPACKAGE *package, LPCWSTR action, UINT
620620 if (uirc == IDCANCEL )
621621 return ERROR_INSTALL_USEREXIT ;
622622 ui_actioninfo (package , action , TRUE, 0 );
623- arc = ACTION_CustomAction ( package , action , script );
623+ arc = ACTION_CustomAction (package , action );
624624 uirc = !arc ;
625625
626626 if (arc == ERROR_FUNCTION_NOT_CALLED && needs_ui_sequence (package ))
@@ -1553,11 +1553,13 @@ static UINT execute_script( MSIPACKAGE *package, UINT script )
15531553
15541554 TRACE ("executing script %u\n" , script );
15551555
1556+ package -> script = script ;
1557+
15561558 if (script == SCRIPT_ROLLBACK )
15571559 {
15581560 for (i = package -> script_actions_count [script ]; i > 0 ; i -- )
15591561 {
1560- rc = ACTION_PerformAction (package , package -> script_actions [script ][i - 1 ], script );
1562+ rc = ACTION_PerformAction (package , package -> script_actions [script ][i - 1 ]);
15611563 if (rc != ERROR_SUCCESS )
15621564 {
15631565 ERR ("Execution of script %i halted; action %s returned %u\n" ,
@@ -1570,7 +1572,7 @@ static UINT execute_script( MSIPACKAGE *package, UINT script )
15701572 {
15711573 for (i = 0 ; i < package -> script_actions_count [script ]; i ++ )
15721574 {
1573- rc = ACTION_PerformAction (package , package -> script_actions [script ][i ], script );
1575+ rc = ACTION_PerformAction (package , package -> script_actions [script ][i ]);
15741576 if (rc != ERROR_SUCCESS )
15751577 {
15761578 ERR ("Execution of script %i halted; action %s returned %u\n" ,
@@ -1579,6 +1581,9 @@ static UINT execute_script( MSIPACKAGE *package, UINT script )
15791581 }
15801582 }
15811583 }
1584+
1585+ package -> script = SCRIPT_NONE ;
1586+
15821587 msi_free_action_script (package , script );
15831588 return rc ;
15841589}
@@ -5686,7 +5691,7 @@ static UINT ACTION_ExecuteAction(MSIPACKAGE *package)
56865691 msiobj_release (& uirow -> hdr );
56875692 }
56885693 else
5689- rc = ACTION_PerformAction (package , action , SCRIPT_NONE );
5694+ rc = ACTION_PerformAction (package , action );
56905695
56915696 /* Send all set properties. */
56925697 if (!MSI_OpenQuery (package -> db , & view , prop_query ))
@@ -7937,7 +7942,7 @@ static UINT ACTION_HandleStandardAction(MSIPACKAGE *package, LPCWSTR action)
79377942 return rc ;
79387943}
79397944
7940- UINT ACTION_PerformAction (MSIPACKAGE * package , const WCHAR * action , UINT script )
7945+ UINT ACTION_PerformAction (MSIPACKAGE * package , const WCHAR * action )
79417946{
79427947 UINT rc ;
79437948
@@ -7947,7 +7952,7 @@ UINT ACTION_PerformAction(MSIPACKAGE *package, const WCHAR *action, UINT script)
79477952 rc = ACTION_HandleStandardAction (package , action );
79487953
79497954 if (rc == ERROR_FUNCTION_NOT_CALLED )
7950- rc = ACTION_HandleCustomAction (package , action , script );
7955+ rc = ACTION_HandleCustomAction (package , action );
79517956
79527957 if (rc == ERROR_FUNCTION_NOT_CALLED )
79537958 WARN ("unhandled msi action %s\n" , debugstr_w (action ));
@@ -8000,7 +8005,7 @@ static UINT ACTION_PerformActionSequence(MSIPACKAGE *package, UINT seq)
80008005 return ERROR_FUNCTION_FAILED ;
80018006 }
80028007
8003- rc = ACTION_PerformAction (package , action , SCRIPT_NONE );
8008+ rc = ACTION_PerformAction (package , action );
80048009
80058010 msiobj_release (& row -> hdr );
80068011 }
@@ -8128,7 +8133,7 @@ UINT MSI_InstallPackage( MSIPACKAGE *package, LPCWSTR szPackagePath,
81288133 msi_set_property ( package -> db , szRollbackDisabled , szOne , -1 );
81298134 }
81308135
8131- rc = ACTION_PerformAction (package , action , SCRIPT_NONE );
8136+ rc = ACTION_PerformAction (package , action );
81328137
81338138 /* process the ending type action */
81348139 if (rc == ERROR_SUCCESS )
0 commit comments