msi: -1 as reg root

Aric Stewart aric at codeweavers.com
Thu Jun 23 09:44:48 CDT 2005


properly handle -1 as a Registry key root.
-------------- next part --------------
Index: dlls/msi/action.c
===================================================================
RCS file: /home/wine/wine/dlls/msi/action.c,v
retrieving revision 1.160
diff -u -r1.160 action.c
--- dlls/msi/action.c	23 Jun 2005 11:04:09 -0000	1.160
+++ dlls/msi/action.c	23 Jun 2005 14:43:16 -0000
@@ -2098,6 +2053,23 @@
     /* get the root key */
     switch (root)
     {
+        case -1: 
+            {
+                static const WCHAR szALLUSER[] = {'A','L','L','U','S','E','R','S',0};
+                LPWSTR all_users = load_dynamic_property(package, szALLUSER, NULL);
+                if (all_users && all_users[0] == '1')
+                {
+                    root_key = HKEY_LOCAL_MACHINE;
+                    szRoot = szHLM;
+                }
+                else
+                {
+                    root_key = HKEY_CURRENT_USER;
+                    szRoot = szHCU;
+                }
+                HeapFree(GetProcessHeap(),0,all_users);
+            }
+                 break;
         case 0:  root_key = HKEY_CLASSES_ROOT; 
                  szRoot = szHCR;
                  break;


More information about the wine-patches mailing list