Hans Leidekker : msi: Set ProductState property.

Alexandre Julliard julliard at winehq.org
Fri Sep 11 10:53:28 CDT 2009


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

Author: Hans Leidekker <hans at codeweavers.com>
Date:   Fri Sep 11 15:46:12 2009 +0200

msi: Set ProductState property.

---

 dlls/msi/package.c |   14 ++++++++++----
 1 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/dlls/msi/package.c b/dlls/msi/package.c
index 82de944..f74bf05 100644
--- a/dlls/msi/package.c
+++ b/dlls/msi/package.c
@@ -453,13 +453,14 @@ static VOID set_installer_properties(MSIPACKAGE *package)
     static const WCHAR szTime[] = {'T','i','m','e',0};
     static const WCHAR szUserLangID[] = {'U','s','e','r','L','a','n','g','u','a','g','e','I','D',0};
     static const WCHAR szSystemLangID[] = {'S','y','s','t','e','m','L','a','n','g','u','a','g','e','I','D',0};
+    static const WCHAR szProductState[] = {'P','r','o','d','u','c','t','S','t','a','t','e',0};
 
     /*
      * Other things that probably should be set:
      *
      * ComputerName LogonUser VirtualMemory
      * ShellAdvSupport DefaultUIFont PackagecodeChanging
-     * ProductState CaptionHeight BorderTop BorderSide TextHeight
+     * CaptionHeight BorderTop BorderSide TextHeight
      * RedirectedDllSupport
      */
 
@@ -658,6 +659,9 @@ static VOID set_installer_properties(MSIPACKAGE *package)
     sprintfW(bufstr, szIntFormat, langid);
 
     MSI_SetPropertyW( package, szSystemLangID, bufstr );
+
+    sprintfW(bufstr, szIntFormat, MsiQueryProductStateW(package->ProductCode));
+    MSI_SetPropertyW( package, szProductState, bufstr );
 }
 
 static UINT msi_load_summary_properties( MSIPACKAGE *package )
@@ -804,12 +808,14 @@ MSIPACKAGE *MSI_CreatePackage( MSIDATABASE *db, LPCWSTR base_url )
 
         create_temp_property_table( package );
         msi_clone_properties( package );
-        set_installer_properties(package);
-        sprintfW(uilevel,szpi,gUILevel);
-        MSI_SetPropertyW(package, szLevel, uilevel);
 
         package->ProductCode = msi_dup_property( package, szProductCode );
         set_installed_prop( package );
+        set_installer_properties( package );
+
+        sprintfW(uilevel,szpi,gUILevel);
+        MSI_SetPropertyW(package, szLevel, uilevel);
+
         r = msi_load_summary_properties( package );
         if (r != ERROR_SUCCESS)
         {




More information about the wine-cvs mailing list