msi: InstallPackage check for UI level must not disregard flags (updated)

Misha Koshelev mk144210 at bcm.tmc.edu
Mon Feb 5 23:25:15 CST 2007


This is an update, a little less hacky thanks to advice from Dmitry
Timoshkov. This fixes bug #6992. The installer for Vector NTI 10 was
getting to the
point where it was trying to launch the .msi files that do the actual
install, but was quitting with the message "This module is not designed
for direct execution." Install worked fine with native MSI. After a
while of playing with it and disassembling the MSI file with dark.exe
tool, I noticed that the .msi files ran in execute mode but not UI mode.
Finally, I checked the UI level that wine msi was reading, and it was
102 which is INSTALLUILEVEL_NONE | INSTALLUILEVEL_SOURCESONLY. However,
MSI_InstallPackage was only checking if the uilevel >=
INSTALLUILEVEL_REDUCED, which would have been true in this case as
INSTALLUILEVEL_SOURCESONLY > INSTALLUILEVEL_REDUCED but the actual ui
level is INSTALLUILEVEL_NONE which is < INSTALLUILEVEL_REDUCED. This
patch fixes this check, and now the installer finished successfully
(although it seems upon a quick check that there are more install bugs
for this program in wine, as not all files that should be there seem to
be there after this install). 

Changelog:

        * msi: InstallPackage check for UI level must not disregard 
               INSTALLUILEVEL flags.
-------------- next part --------------
From a90a0ad30d2c7e78a4f64f8b0d96ca21d05a0034 Mon Sep 17 00:00:00 2001
From: Misha Koshelev <mk144210 at bcm.tmc.edu>
Date: Mon, 5 Feb 2007 23:21:43 -0600
Subject: msi: InstallPackage check for UI level must not disregard flags.
---
 dlls/msi/action.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/msi/action.c b/dlls/msi/action.c
index 0c8ac79..6c2fdf4 100644
--- a/dlls/msi/action.c
+++ b/dlls/msi/action.c
@@ -642,7 +642,7 @@ UINT MSI_InstallPackage( MSIPACKAGE *pac
     msi_apply_transforms( package );
     msi_apply_patches( package );
 
-    if ( msi_get_property_int(package, szUILevel, 0) >= INSTALLUILEVEL_REDUCED )
+    if ( (msi_get_property_int(package, szUILevel, 0) & 0xf) >= INSTALLUILEVEL_REDUCED )
     {
         package->script->InWhatSequence |= SEQUENCE_UI;
         rc = ACTION_ProcessUISequence(package);
-- 
1.4.1



More information about the wine-patches mailing list