James Hawkins : msi: Run the InstallExecute sequence if the InstallUISequnce table is empty.

Alexandre Julliard julliard at wine.codeweavers.com
Mon Apr 16 07:08:41 CDT 2007


Module: wine
Branch: master
Commit: 6da8041d4752e86d65d46348f84810bcd99c823a
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=6da8041d4752e86d65d46348f84810bcd99c823a

Author: James Hawkins <truiken at gmail.com>
Date:   Sun Apr 15 03:10:58 2007 -0500

msi: Run the InstallExecute sequence if the InstallUISequnce table is empty.

---

 dlls/msi/action.c |   31 ++++++++++++++++++++++++++++---
 1 files changed, 28 insertions(+), 3 deletions(-)

diff --git a/dlls/msi/action.c b/dlls/msi/action.c
index 51d827e..f047a27 100644
--- a/dlls/msi/action.c
+++ b/dlls/msi/action.c
@@ -584,6 +584,30 @@ static UINT msi_apply_transforms( MSIPACKAGE *package )
     return r;
 }
 
+BOOL ui_sequence_exists( MSIPACKAGE *package )
+{
+    MSIQUERY *view;
+    UINT rc;
+
+    static const WCHAR ExecSeqQuery [] =
+        {'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ',
+         '`','I','n','s','t','a','l','l',
+         'U','I','S','e','q','u','e','n','c','e','`',
+         ' ','W','H','E','R','E',' ',
+         '`','S','e','q','u','e','n','c','e','`',' ',
+         '>',' ','0',' ','O','R','D','E','R',' ','B','Y',' ',
+         '`','S','e','q','u','e','n','c','e','`',0};
+
+    rc = MSI_DatabaseOpenViewW(package->db, ExecSeqQuery, &view);
+    if (rc == ERROR_SUCCESS)
+    {
+        msiobj_release(&view->hdr);
+        return TRUE;
+    }
+
+    return FALSE;
+}
+
 /****************************************************
  * TOP level entry points 
  *****************************************************/
@@ -592,7 +616,7 @@ UINT MSI_InstallPackage( MSIPACKAGE *package, LPCWSTR szPackagePath,
                          LPCWSTR szCommandLine )
 {
     UINT rc;
-    BOOL ui = FALSE;
+    BOOL ui = FALSE, ui_exists;
     static const WCHAR szUILevel[] = {'U','I','L','e','v','e','l',0};
     static const WCHAR szAction[] = {'A','C','T','I','O','N',0};
     static const WCHAR szInstall[] = {'I','N','S','T','A','L','L',0};
@@ -647,10 +671,11 @@ UINT MSI_InstallPackage( MSIPACKAGE *package, LPCWSTR szPackagePath,
         package->script->InWhatSequence |= SEQUENCE_UI;
         rc = ACTION_ProcessUISequence(package);
         ui = TRUE;
-        if (rc == ERROR_SUCCESS)
+        ui_exists = ui_sequence_exists(package);
+        if (rc == ERROR_SUCCESS || !ui_exists)
         {
             package->script->InWhatSequence |= SEQUENCE_EXEC;
-            rc = ACTION_ProcessExecSequence(package,TRUE);
+            rc = ACTION_ProcessExecSequence(package,ui_exists);
         }
     }
     else




More information about the wine-cvs mailing list