msi Set the feature action to INSTALLSTATE_UNKNOWN if msidbFeatureAttributesUIDisallowAbsent is set.

This commit is contained in:
Hans Leidekker 2010-10-06 15:45:05 +02:00 committed by Alexandre Julliard
parent 85874c07b9
commit 3cd55cc916
2 changed files with 291 additions and 0 deletions

View file

@ -29,6 +29,7 @@
#include "fdi.h"
#include "msi.h"
#include "msiquery.h"
#include "msidefs.h"
#include "objbase.h"
#include "objidl.h"
#include "winnls.h"
@ -929,6 +930,10 @@ static inline void msi_feature_set_state(MSIPACKAGE *package,
feature->ActionRequest = state;
feature->Action = state;
}
if (feature->Attributes & msidbFeatureAttributesUIDisallowAbsent)
{
feature->Action = INSTALLSTATE_UNKNOWN;
}
}
static inline void msi_component_set_state(MSIPACKAGE *package,

View file

@ -2680,6 +2680,13 @@ static void test_states(void)
r = add_component_entry( hdb, "'chi', '{E6B539AB-5DA9-4236-A2D2-E341A50B4C38}', 'TARGETDIR', 1, '', 'chi_file'" );
ok( r == ERROR_SUCCESS, "cannot add component: %d\n", r );
/* msidbFeatureAttributesUIDisallowAbsent */
r = add_feature_entry( hdb, "'eleven', '', '', '', 2, 1, '', 16" );
ok( r == ERROR_SUCCESS, "cannot add feature: %d\n", r );
r = add_component_entry( hdb, "'psi', '{A06B23B5-746B-427A-8A6E-FD6AC8F46A95}', 'TARGETDIR', 1, '', 'psi_file'" );
ok( r == ERROR_SUCCESS, "cannot add component: %d\n", r );
r = create_feature_components_table( hdb );
ok( r == ERROR_SUCCESS, "cannot create FeatureComponents table: %d\n", r );
@ -2749,6 +2756,9 @@ static void test_states(void)
r = add_feature_components_entry( hdb, "'ten', 'chi'" );
ok( r == ERROR_SUCCESS, "cannot add feature components: %d\n", r );
r = add_feature_components_entry( hdb, "'eleven', 'psi'" );
ok( r == ERROR_SUCCESS, "cannot add feature components: %d\n", r );
r = create_file_table( hdb );
ok( r == ERROR_SUCCESS, "cannot create File table: %d\n", r );
@ -2816,6 +2826,9 @@ static void test_states(void)
r = add_file_entry( hdb, "'chi_file', 'chi', 'chi.txt', 100, '', '1033', 8192, 1" );
ok( r == ERROR_SUCCESS, "cannot add file: %d\n", r);
r = add_file_entry( hdb, "'psi_file', 'psi', 'psi.txt', 100, '', '1033', 8192, 1" );
ok( r == ERROR_SUCCESS, "cannot add file: %d\n", r);
MsiDatabaseCommit(hdb);
/* these properties must not be in the saved msi file */
@ -2919,6 +2932,13 @@ static void test_states(void)
ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state);
ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action);
state = 0xdeadbee;
action = 0xdeadbee;
r = MsiGetFeatureState(hpkg, "eleven", &state, &action);
ok( r == ERROR_UNKNOWN_FEATURE, "Expected ERROR_UNKNOWN_FEATURE, got %d\n", r );
ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state);
ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action);
state = 0xdeadbee;
action = 0xdeadbee;
r = MsiGetComponentState(hpkg, "alpha", &state, &action);
@ -3066,6 +3086,13 @@ static void test_states(void)
ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state);
ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action);
state = 0xdeadbee;
action = 0xdeadbee;
r = MsiGetComponentState(hpkg, "psi", &state, &action);
ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r );
ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state);
ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action);
r = MsiDoAction( hpkg, "CostInitialize");
ok( r == ERROR_SUCCESS, "cost init failed\n");
@ -3139,6 +3166,13 @@ static void test_states(void)
ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action);
state = 0xdeadbee;
action = 0xdeadbee;
r = MsiGetFeatureState(hpkg, "eleven", &state, &action);
ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r );
ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action);
state = 0xdeadbee;
action = 0xdeadbee;
r = MsiGetComponentState(hpkg, "alpha", &state, &action);
@ -3286,6 +3320,13 @@ static void test_states(void)
ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action);
state = 0xdeadbee;
action = 0xdeadbee;
r = MsiGetComponentState(hpkg, "psi", &state, &action);
ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r );
ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action);
r = MsiDoAction( hpkg, "FileCost");
ok( r == ERROR_SUCCESS, "file cost failed\n");
@ -3372,6 +3413,13 @@ static void test_states(void)
ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action);
state = 0xdeadbee;
action = 0xdeadbee;
r = MsiGetFeatureState(hpkg, "eleven", &state, &action);
ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r );
ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action);
state = 0xdeadbee;
action = 0xdeadbee;
r = MsiGetComponentState(hpkg, "alpha", &state, &action);
@ -3519,6 +3567,13 @@ static void test_states(void)
ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action);
state = 0xdeadbee;
action = 0xdeadbee;
r = MsiGetComponentState(hpkg, "psi", &state, &action);
ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r );
ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action);
r = MsiDoAction( hpkg, "CostFinalize");
ok( r == ERROR_SUCCESS, "cost finalize failed: %d\n", r);
@ -3592,6 +3647,13 @@ static void test_states(void)
ok( state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state);
ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action);
state = 0xdeadbee;
action = 0xdeadbee;
r = MsiGetFeatureState(hpkg, "eleven", &state, &action);
ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r );
ok( state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state);
ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action);
state = 0xdeadbee;
action = 0xdeadbee;
r = MsiGetComponentState(hpkg, "alpha", &state, &action);
@ -3739,6 +3801,13 @@ static void test_states(void)
ok( state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state);
ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action);
state = 0xdeadbee;
action = 0xdeadbee;
r = MsiGetComponentState(hpkg, "psi", &state, &action);
ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r );
ok( state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state);
ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action);
MsiCloseHandle( hpkg );
/* publish the features and components */
@ -3836,6 +3905,13 @@ static void test_states(void)
ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state);
ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action);
state = 0xdeadbee;
action = 0xdeadbee;
r = MsiGetFeatureState(hpkg, "eleven", &state, &action);
ok( r == ERROR_UNKNOWN_FEATURE, "Expected ERROR_UNKNOWN_FEATURE, got %d\n", r );
ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state);
ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action);
state = 0xdeadbee;
action = 0xdeadbee;
r = MsiGetComponentState(hpkg, "alpha", &state, &action);
@ -3983,6 +4059,13 @@ static void test_states(void)
ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state);
ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action);
state = 0xdeadbee;
action = 0xdeadbee;
r = MsiGetComponentState(hpkg, "psi", &state, &action);
ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r );
ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state);
ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action);
r = MsiDoAction( hpkg, "CostInitialize");
ok( r == ERROR_SUCCESS, "cost init failed\n");
@ -4056,6 +4139,13 @@ static void test_states(void)
ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action);
state = 0xdeadbee;
action = 0xdeadbee;
r = MsiGetFeatureState(hpkg, "eleven", &state, &action);
ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r );
ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action);
state = 0xdeadbee;
action = 0xdeadbee;
r = MsiGetComponentState(hpkg, "alpha", &state, &action);
@ -4203,6 +4293,13 @@ static void test_states(void)
ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action);
state = 0xdeadbee;
action = 0xdeadbee;
r = MsiGetComponentState(hpkg, "psi", &state, &action);
ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r );
ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action);
r = MsiDoAction( hpkg, "FileCost");
ok( r == ERROR_SUCCESS, "file cost failed\n");
@ -4416,6 +4513,13 @@ static void test_states(void)
ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action);
state = 0xdeadbee;
action = 0xdeadbee;
r = MsiGetComponentState(hpkg, "psi", &state, &action);
ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r );
ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action);
r = MsiDoAction( hpkg, "CostFinalize");
ok( r == ERROR_SUCCESS, "cost finalize failed: %d\n", r);
@ -4489,6 +4593,13 @@ static void test_states(void)
ok( state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state);
ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action);
state = 0xdeadbee;
action = 0xdeadbee;
r = MsiGetFeatureState(hpkg, "eleven", &state, &action);
ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r );
ok( state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state);
ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action);
state = 0xdeadbee;
action = 0xdeadbee;
r = MsiGetComponentState(hpkg, "alpha", &state, &action);
@ -4636,6 +4747,13 @@ static void test_states(void)
ok( state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state);
ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action);
state = 0xdeadbee;
action = 0xdeadbee;
r = MsiGetComponentState(hpkg, "psi", &state, &action);
ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r );
ok( state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state);
ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action);
MsiCloseHandle(hpkg);
/* uninstall the product */
@ -4726,6 +4844,13 @@ static void test_states(void)
ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state);
ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action);
state = 0xdeadbee;
action = 0xdeadbee;
r = MsiGetFeatureState(hpkg, "eleven", &state, &action);
ok( r == ERROR_UNKNOWN_FEATURE, "Expected ERROR_UNKNOWN_FEATURE, got %d\n", r );
ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state);
ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action);
state = 0xdeadbee;
action = 0xdeadbee;
r = MsiGetComponentState(hpkg, "alpha", &state, &action);
@ -4873,6 +4998,13 @@ static void test_states(void)
ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state);
ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action);
state = 0xdeadbee;
action = 0xdeadbee;
r = MsiGetComponentState(hpkg, "psi", &state, &action);
ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r );
ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state);
ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action);
r = MsiDoAction( hpkg, "CostInitialize");
ok( r == ERROR_SUCCESS, "cost init failed\n");
@ -4946,6 +5078,13 @@ static void test_states(void)
ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action);
state = 0xdeadbee;
action = 0xdeadbee;
r = MsiGetFeatureState(hpkg, "eleven", &state, &action);
ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r );
ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action);
state = 0xdeadbee;
action = 0xdeadbee;
r = MsiGetComponentState(hpkg, "alpha", &state, &action);
@ -5093,6 +5232,13 @@ static void test_states(void)
ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action);
state = 0xdeadbee;
action = 0xdeadbee;
r = MsiGetComponentState(hpkg, "psi", &state, &action);
ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r );
ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action);
r = MsiDoAction( hpkg, "FileCost");
ok( r == ERROR_SUCCESS, "file cost failed\n");
@ -5166,6 +5312,13 @@ static void test_states(void)
ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action);
state = 0xdeadbee;
action = 0xdeadbee;
r = MsiGetFeatureState(hpkg, "eleven", &state, &action);
ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r );
ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action);
state = 0xdeadbee;
action = 0xdeadbee;
r = MsiGetComponentState(hpkg, "alpha", &state, &action);
@ -5313,6 +5466,13 @@ static void test_states(void)
ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action);
state = 0xdeadbee;
action = 0xdeadbee;
r = MsiGetComponentState(hpkg, "psi", &state, &action);
ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r );
ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action);
r = MsiDoAction( hpkg, "CostFinalize");
ok( r == ERROR_SUCCESS, "cost finalize failed: %d\n", r);
@ -5386,6 +5546,13 @@ static void test_states(void)
ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state);
todo_wine ok( action == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", action);
state = 0xdeadbee;
action = 0xdeadbee;
r = MsiGetFeatureState(hpkg, "eleven", &state, &action);
ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r );
ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state);
ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action);
state = 0xdeadbee;
action = 0xdeadbee;
r = MsiGetComponentState(hpkg, "alpha", &state, &action);
@ -5533,6 +5700,13 @@ static void test_states(void)
ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state);
todo_wine ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action);
state = 0xdeadbee;
action = 0xdeadbee;
r = MsiGetComponentState(hpkg, "psi", &state, &action);
ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r );
ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state);
ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action);
MsiCloseHandle(hpkg);
/* uninstall the product */
@ -5623,6 +5797,13 @@ static void test_states(void)
ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state);
ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action);
state = 0xdeadbee;
action = 0xdeadbee;
r = MsiGetFeatureState(hpkg, "eleven", &state, &action);
ok( r == ERROR_UNKNOWN_FEATURE, "Expected ERROR_UNKNOWN_FEATURE, got %d\n", r );
ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state);
ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action);
state = 0xdeadbee;
action = 0xdeadbee;
r = MsiGetComponentState(hpkg, "alpha", &state, &action);
@ -5770,6 +5951,13 @@ static void test_states(void)
ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state);
ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action);
state = 0xdeadbee;
action = 0xdeadbee;
r = MsiGetComponentState(hpkg, "psi", &state, &action);
ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r );
ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state);
ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action);
r = MsiDoAction( hpkg, "CostInitialize");
ok( r == ERROR_SUCCESS, "cost init failed\n");
@ -5843,6 +6031,13 @@ static void test_states(void)
ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action);
state = 0xdeadbee;
action = 0xdeadbee;
r = MsiGetFeatureState(hpkg, "eleven", &state, &action);
ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r );
ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action);
state = 0xdeadbee;
action = 0xdeadbee;
r = MsiGetComponentState(hpkg, "alpha", &state, &action);
@ -5990,6 +6185,13 @@ static void test_states(void)
ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action);
state = 0xdeadbee;
action = 0xdeadbee;
r = MsiGetComponentState(hpkg, "psi", &state, &action);
ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r );
ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action);
r = MsiDoAction( hpkg, "FileCost");
ok( r == ERROR_SUCCESS, "file cost failed\n");
@ -6063,6 +6265,13 @@ static void test_states(void)
ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action);
state = 0xdeadbee;
action = 0xdeadbee;
r = MsiGetFeatureState(hpkg, "eleven", &state, &action);
ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r );
ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action);
state = 0xdeadbee;
action = 0xdeadbee;
r = MsiGetComponentState(hpkg, "alpha", &state, &action);
@ -6210,6 +6419,13 @@ static void test_states(void)
ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action);
state = 0xdeadbee;
action = 0xdeadbee;
r = MsiGetComponentState(hpkg, "psi", &state, &action);
ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r );
ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action);
r = MsiDoAction( hpkg, "CostFinalize");
ok( r == ERROR_SUCCESS, "cost finalize failed: %d\n", r);
@ -6283,6 +6499,13 @@ static void test_states(void)
ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state);
ok( action == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", action);
state = 0xdeadbee;
action = 0xdeadbee;
r = MsiGetFeatureState(hpkg, "eleven", &state, &action);
ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r );
ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state);
ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action);
state = 0xdeadbee;
action = 0xdeadbee;
r = MsiGetComponentState(hpkg, "alpha", &state, &action);
@ -6430,6 +6653,13 @@ static void test_states(void)
ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state);
ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action);
state = 0xdeadbee;
action = 0xdeadbee;
r = MsiGetComponentState(hpkg, "psi", &state, &action);
ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r );
ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state);
ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action);
MsiCloseHandle(hpkg);
/* reinstall the product */
@ -6516,6 +6746,13 @@ static void test_states(void)
ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state);
ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action);
state = 0xdeadbee;
action = 0xdeadbee;
r = MsiGetFeatureState(hpkg, "eleven", &state, &action);
ok( r == ERROR_UNKNOWN_FEATURE, "Expected ERROR_UNKNOWN_FEATURE, got %d\n", r );
ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state);
ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action);
state = 0xdeadbee;
action = 0xdeadbee;
r = MsiGetComponentState(hpkg, "alpha", &state, &action);
@ -6663,6 +6900,13 @@ static void test_states(void)
ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state);
ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action);
state = 0xdeadbee;
action = 0xdeadbee;
r = MsiGetComponentState(hpkg, "psi", &state, &action);
ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r );
ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state);
ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action);
r = MsiDoAction( hpkg, "CostInitialize");
ok( r == ERROR_SUCCESS, "cost init failed\n");
@ -6736,6 +6980,13 @@ static void test_states(void)
ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action);
state = 0xdeadbee;
action = 0xdeadbee;
r = MsiGetFeatureState(hpkg, "eleven", &state, &action);
ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r );
ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action);
state = 0xdeadbee;
action = 0xdeadbee;
r = MsiGetComponentState(hpkg, "alpha", &state, &action);
@ -6883,6 +7134,13 @@ static void test_states(void)
ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action);
state = 0xdeadbee;
action = 0xdeadbee;
r = MsiGetComponentState(hpkg, "psi", &state, &action);
ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r );
ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action);
r = MsiDoAction( hpkg, "FileCost");
ok( r == ERROR_SUCCESS, "file cost failed\n");
@ -6956,6 +7214,13 @@ static void test_states(void)
ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action);
state = 0xdeadbee;
action = 0xdeadbee;
r = MsiGetFeatureState(hpkg, "eleven", &state, &action);
ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r );
ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action);
state = 0xdeadbee;
action = 0xdeadbee;
r = MsiGetComponentState(hpkg, "alpha", &state, &action);
@ -7103,6 +7368,13 @@ static void test_states(void)
ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action);
state = 0xdeadbee;
action = 0xdeadbee;
r = MsiGetComponentState(hpkg, "psi", &state, &action);
ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r );
ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action);
r = MsiDoAction( hpkg, "CostFinalize");
ok( r == ERROR_SUCCESS, "cost finalize failed: %d\n", r);
@ -7176,6 +7448,13 @@ static void test_states(void)
ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state);
ok( action == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", action);
state = 0xdeadbee;
action = 0xdeadbee;
r = MsiGetFeatureState(hpkg, "eleven", &state, &action);
ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r );
ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state);
ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action);
state = 0xdeadbee;
action = 0xdeadbee;
r = MsiGetComponentState(hpkg, "alpha", &state, &action);
@ -7323,6 +7602,13 @@ static void test_states(void)
ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state);
ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action);
state = 0xdeadbee;
action = 0xdeadbee;
r = MsiGetComponentState(hpkg, "psi", &state, &action);
ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r );
ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state);
ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action);
MsiCloseHandle(hpkg);
/* uninstall the product */