James Hawkins : msi: Allow private properties from the AdminProperties property list.

Alexandre Julliard julliard at winehq.org
Thu Oct 30 10:10:30 CDT 2008


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

Author: James Hawkins <jhawkins at codeweavers.com>
Date:   Thu Oct 30 04:03:07 2008 -0500

msi: Allow private properties from the AdminProperties property list.

---

 dlls/msi/action.c        |   10 +++++++---
 dlls/msi/msipriv.h       |    3 ++-
 dlls/msi/package.c       |    2 +-
 dlls/msi/tests/install.c |    5 +++--
 4 files changed, 13 insertions(+), 7 deletions(-)

diff --git a/dlls/msi/action.c b/dlls/msi/action.c
index 707bc75..09a4915 100644
--- a/dlls/msi/action.c
+++ b/dlls/msi/action.c
@@ -288,7 +288,8 @@ static void ui_actioninfo(MSIPACKAGE *package, LPCWSTR action, BOOL start,
     msiobj_release(&row->hdr);
 }
 
-UINT msi_parse_command_line( MSIPACKAGE *package, LPCWSTR szCommandLine )
+UINT msi_parse_command_line( MSIPACKAGE *package, LPCWSTR szCommandLine,
+                             BOOL preserve_case )
 {
     LPCWSTR ptr,ptr2;
     BOOL quote;
@@ -323,7 +324,10 @@ UINT msi_parse_command_line( MSIPACKAGE *package, LPCWSTR szCommandLine )
         prop = msi_alloc((len+1)*sizeof(WCHAR));
         memcpy(prop,ptr,len*sizeof(WCHAR));
         prop[len]=0;
-        struprW(prop);
+
+        if (!preserve_case)
+            struprW(prop);
+
         ptr2++;
        
         len = 0; 
@@ -728,7 +732,7 @@ UINT MSI_InstallPackage( MSIPACKAGE *package, LPCWSTR szPackagePath,
         msi_set_sourcedir_props(package, FALSE);
     }
 
-    msi_parse_command_line( package, szCommandLine );
+    msi_parse_command_line( package, szCommandLine, FALSE );
 
     msi_apply_transforms( package );
     msi_apply_patches( package );
diff --git a/dlls/msi/msipriv.h b/dlls/msi/msipriv.h
index f174c47..a283820 100644
--- a/dlls/msi/msipriv.h
+++ b/dlls/msi/msipriv.h
@@ -683,7 +683,8 @@ extern UINT ACTION_DialogBox( MSIPACKAGE*, LPCWSTR);
 extern UINT ACTION_ForceReboot(MSIPACKAGE *package);
 extern UINT MSI_Sequence( MSIPACKAGE *package, LPCWSTR szTable, INT iSequenceMode );
 extern UINT MSI_SetFeatureStates( MSIPACKAGE *package );
-extern UINT msi_parse_command_line( MSIPACKAGE *package, LPCWSTR szCommandLine );
+extern UINT msi_parse_command_line( MSIPACKAGE *package, LPCWSTR szCommandLine,
+                                    BOOL preserve_case );
 
 /* record internals */
 extern UINT MSI_RecordSetIStream( MSIRECORD *, UINT, IStream *);
diff --git a/dlls/msi/package.c b/dlls/msi/package.c
index cc47236..f6ef199 100644
--- a/dlls/msi/package.c
+++ b/dlls/msi/package.c
@@ -754,7 +754,7 @@ static UINT msi_load_admin_properties(MSIPACKAGE *package)
     if (r != ERROR_SUCCESS)
         return r;
 
-    r = msi_parse_command_line(package, (WCHAR *)data);
+    r = msi_parse_command_line(package, (WCHAR *)data, TRUE);
 
     msi_free(data);
     return r;
diff --git a/dlls/msi/tests/install.c b/dlls/msi/tests/install.c
index ee10f36..6ae2a51 100644
--- a/dlls/msi/tests/install.c
+++ b/dlls/msi/tests/install.c
@@ -504,7 +504,7 @@ static const CHAR adm_admin_exec_seq_dat[] = "Action\tCondition\tSequence\n"
 static const CHAR amp_component_dat[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
                                         "s72\tS38\ts72\ti2\tS255\tS72\n"
                                         "Component\tComponent\n"
-                                        "augustus\t\tMSITESTDIR\t0\tMYPROP=2718\taugustus\n";
+                                        "augustus\t\tMSITESTDIR\t0\tMYPROP=2718 and MyProp=42\taugustus\n";
 
 static const CHAR rem_component_dat[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
                                         "s72\tS38\ts72\ti2\tS255\tS72\n"
@@ -4240,7 +4240,8 @@ static void set_admin_property_stream(LPCSTR file)
 
     /* AdminProperties */
     static const WCHAR stmname[] = {0x41ca,0x4330,0x3e71,0x44b5,0x4233,0x45f5,0x422c,0x4836,0};
-    static const WCHAR data[] = {'M','Y','P','R','O','P','=','2','7','1','8',0};
+    static const WCHAR data[] = {'M','Y','P','R','O','P','=','2','7','1','8',' ',
+        'M','y','P','r','o','p','=','4','2',0};
 
     MultiByteToWideChar(CP_ACP, 0, file, -1, fileW, MAX_PATH);
 




More information about the wine-cvs mailing list