msi: Conformance test, check that INSTALLUILEVEL flags don't
trigger UI install.
mk144210 at bcm.tmc.edu
Sat Feb 10 23:07:42 CST 2007
Thanks to James Hawkins for numerous emails and help. This patch is a
conformance test that tickles bug #6992 which is now fixed, where MSI
was comparing whether the UI level requested was greater than or equal
to a certain value to determine whether or not to do a graphical
install, but was ignoring the fact that flags could be set in the higher
bits that should not affect the UI level, and this, in turn, caused a
problem with the Vector NTI installer. This conformance test makes an
MSI with three files, one that is always created (this is a check for
installer working), one that is created only in full UI install (thus
the function can know that a full UI install occurred), and one that is
never created (I guess this would be making sure that the installer is
not completely ignoring conditions for file installation). It then
installs it, checks which ones were created, and gives the user
appropriate, verbose error messages.
I tested this conformance test and it is able to detect a UI versus
execute-only install in wine and in VMWared WinXP and Win98. It
successfully passes in its final form on all three platforms, and fails
if I revert the Wine behavior so that it does not take INSTALLUILEVEL
flags into account, telling the user that a full UI install occurred
even though only an execute one was requested.
* msi: Conformance test, check that INSTALLUILEVEL flags don't
trigger UI install.
-------------- next part --------------
From ab4575a1d5ff234581ec3c212efeee58befeead5 Mon Sep 17 00:00:00 2001
From: Misha Koshelev <mk144210 at bcm.tmc.edu>
Date: Fri, 9 Feb 2007 10:43:41 -0600
Subject: msi: Conformance test, check that INSTALLUILEVEL flags don't trigger UI install.
dlls/msi/tests/install.c | 58 ++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 58 insertions(+), 0 deletions(-)
diff --git a/dlls/msi/tests/install.c b/dlls/msi/tests/install.c
index 7a8412b..180c743 100644
@@ -115,6 +115,7 @@ static const CHAR property_dat = "Prop
@@ -221,6 +222,25 @@ static const CHAR ss_media_dat = "Disk
+/* tables for test_uiLevelFlags */
+static const CHAR ui_component_dat = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
+static const CHAR ui_install_ui_seq_dat = "Action\tCondition\tSequence\n"
+static const CHAR ui_custom_action_dat = "Action\tType\tSource\tTarget\tISComments\n"
typedef struct _msi_table
const CHAR *filename;
@@ -305,6 +325,20 @@ static const msi_table ss_tables =
+static const msi_table ui_tables =
/* cabinet definitions */
/* make the max size large so there is only one cab file */
@@ -1063,6 +1097,29 @@ static void test_samesequence(void)
+static void test_uiLevelFlags(void)
+ UINT r;
+ create_database(msifile, ui_tables, sizeof(ui_tables) / sizeof(msi_table));
+ MsiSetInternalUI(INSTALLUILEVEL_NONE | INSTALLUILEVEL_SOURCERESONLY, NULL);
+ r = MsiInstallProductA(msifile, NULL);
+ ok(!delete_pf("msitest\\maximus", TRUE), "UI install occurred, but execute-only was requested.\n");
+ ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
+ ok(delete_pf("msitest\\augustus", TRUE), "File not installed\n");
+ ok(delete_pf("msitest\\caesar", TRUE), "File not installed\n");
+ delete_pf("msitest", FALSE);
@@ -1087,6 +1144,7 @@ START_TEST(install)
More information about the wine-patches