Author: akhaldi
Date: Sun Jun  8 17:05:26 2014
New Revision: 63557

URL: http://svn.reactos.org/svn/reactos?rev=63557&view=rev
Log:
[MSI]
* Do not rely on RegDeleteTreeW which shouldn't be exported.
CORE-8174

Modified:
    trunk/reactos/dll/win32/msi/action.c
    trunk/reactos/dll/win32/msi/classes.c
    trunk/reactos/dll/win32/msi/registry.c

Modified: trunk/reactos/dll/win32/msi/action.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msi/action.c?rev=63557&r1=63556&r2=63557&view=diff
==============================================================================
--- trunk/reactos/dll/win32/msi/action.c        [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/msi/action.c        [iso-8859-1] Sun Jun  8 
17:05:26 2014
@@ -2989,7 +2989,7 @@
     HKEY hkey;
 
     if (!(hkey = open_key( root, path, FALSE ))) return;
-    res = RegDeleteTreeW( hkey, NULL );
+    res = SHDeleteKeyW( hkey, NULL );
     if (res) TRACE("failed to delete subtree of %s (%d)\n", debugstr_w(path), 
res);
     delete_key( root, path );
     RegCloseKey( hkey );

Modified: trunk/reactos/dll/win32/msi/classes.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msi/classes.c?rev=63557&r1=63556&r2=63557&view=diff
==============================================================================
--- trunk/reactos/dll/win32/msi/classes.c       [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/msi/classes.c       [iso-8859-1] Sun Jun  8 
17:05:26 2014
@@ -953,7 +953,7 @@
 
         cls->action = INSTALLSTATE_ABSENT;
 
-        res = RegDeleteTreeW( hkey, cls->clsid );
+        res = SHDeleteKeyW( hkey, cls->clsid );
         if (res != ERROR_SUCCESS)
             WARN("Failed to delete class key %d\n", res);
 
@@ -975,7 +975,7 @@
             {
                 strcpyW( filetype, szFileType );
                 strcatW( filetype, cls->clsid );
-                res = RegDeleteTreeW( HKEY_CLASSES_ROOT, filetype );
+                res = SHDeleteKeyW( HKEY_CLASSES_ROOT, filetype );
                 msi_free( filetype );
 
                 if (res != ERROR_SUCCESS)
@@ -1148,7 +1148,7 @@
         }
         TRACE("Unregistering progid %s\n", debugstr_w(progid->ProgID));
 
-        res = RegDeleteTreeW( HKEY_CLASSES_ROOT, progid->ProgID );
+        res = SHDeleteKeyW( HKEY_CLASSES_ROOT, progid->ProgID );
         if (res != ERROR_SUCCESS)
             TRACE("Failed to delete progid key %d\n", res);
 
@@ -1392,7 +1392,7 @@
         {
             extension[0] = '.';
             strcpyW( extension + 1, ext->Extension );
-            res = RegDeleteTreeW( HKEY_CLASSES_ROOT, extension );
+            res = SHDeleteKeyW( HKEY_CLASSES_ROOT, extension );
             msi_free( extension );
             if (res != ERROR_SUCCESS)
                 WARN("Failed to delete extension key %d\n", res);
@@ -1414,7 +1414,7 @@
             {
                 strcpyW( progid_shell, progid );
                 strcatW( progid_shell, shellW );
-                res = RegDeleteTreeW( HKEY_CLASSES_ROOT, progid_shell );
+                res = SHDeleteKeyW( HKEY_CLASSES_ROOT, progid_shell );
                 msi_free( progid_shell );
                 if (res != ERROR_SUCCESS)
                     WARN("Failed to delete shell key %d\n", res);

Modified: trunk/reactos/dll/win32/msi/registry.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msi/registry.c?rev=63557&r1=63556&r2=63557&view=diff
==============================================================================
--- trunk/reactos/dll/win32/msi/registry.c      [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/msi/registry.c      [iso-8859-1] Sun Jun  8 
17:05:26 2014
@@ -477,7 +477,7 @@
         strcpyW(keypath, szUninstall);
         strcatW(keypath, product);
     }
-    return RegDeleteTreeW(HKEY_LOCAL_MACHINE, keypath);
+    return SHDeleteKeyW(HKEY_LOCAL_MACHINE, keypath);
 }
 
 UINT MSIREG_OpenProductKey(LPCWSTR szProduct, LPCWSTR szUserSid, 
MSIINSTALLCONTEXT context, HKEY *key, BOOL create)
@@ -528,7 +528,7 @@
 
     strcpyW(keypath, szUserProducts);
     strcatW(keypath, squished_pc);
-    return RegDeleteTreeW(HKEY_CURRENT_USER, keypath);
+    return SHDeleteKeyW(HKEY_CURRENT_USER, keypath);
 }
 
 UINT MSIREG_OpenUserPatchesKey(LPCWSTR szPatch, HKEY *key, BOOL create)
@@ -593,7 +593,7 @@
 
     strcpyW(keypath, szUserFeatures);
     strcatW(keypath, squished_pc);
-    return RegDeleteTreeW(HKEY_CURRENT_USER, keypath);
+    return SHDeleteKeyW(HKEY_CURRENT_USER, keypath);
 }
 
 static UINT MSIREG_OpenInstallerFeaturesKey(LPCWSTR szProduct, HKEY *key, BOOL 
create)
@@ -707,7 +707,7 @@
         sprintfW(keypath, szUserDataComponents_fmt, szUserSid);
 
     if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, keypath, 0, access, &hkey)) return 
ERROR_SUCCESS;
-    r = RegDeleteTreeW(hkey, comp);
+    r = SHDeleteKeyW(hkey, comp);
     RegCloseKey(hkey);
     return r;
 }
@@ -788,7 +788,7 @@
         LocalFree(usersid);
     }
     if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, keypath, 0, access, &hkey)) return 
ERROR_SUCCESS;
-    r = RegDeleteTreeW(hkey, squished_patch);
+    r = SHDeleteKeyW(hkey, squished_patch);
     RegCloseKey(hkey);
     return r;
 }
@@ -865,7 +865,7 @@
     LocalFree(usersid);
 
     if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, keypath, 0, access, &hkey)) return 
ERROR_SUCCESS;
-    r = RegDeleteTreeW(hkey, squished_pc);
+    r = SHDeleteKeyW(hkey, squished_pc);
     RegCloseKey(hkey);
     return r;
 }
@@ -881,7 +881,7 @@
     TRACE("%s squished %s\n", debugstr_w(szProduct), debugstr_w(squished_pc));
 
     if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, szInstaller_Products, 0, access, 
&hkey)) return ERROR_SUCCESS;
-    r = RegDeleteTreeW(hkey, squished_pc);
+    r = SHDeleteKeyW(hkey, squished_pc);
     RegCloseKey(hkey);
     return r;
 }
@@ -938,7 +938,7 @@
 
     strcpyW(keypath, szInstaller_UserUpgradeCodes);
     strcatW(keypath, squished_pc);
-    return RegDeleteTreeW(HKEY_CURRENT_USER, keypath);
+    return SHDeleteKeyW(HKEY_CURRENT_USER, keypath);
 }
 
 UINT MSIREG_DeleteLocalClassesProductKey(LPCWSTR szProductCode)
@@ -952,7 +952,7 @@
     TRACE("%s squished %s\n", debugstr_w(szProductCode), 
debugstr_w(squished_pc));
 
     if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, szInstaller_LocalClassesProducts, 0, 
access, &hkey)) return ERROR_SUCCESS;
-    r = RegDeleteTreeW(hkey, squished_pc);
+    r = SHDeleteKeyW(hkey, squished_pc);
     RegCloseKey(hkey);
     return r;
 }
@@ -968,7 +968,7 @@
     TRACE("%s squished %s\n", debugstr_w(szProductCode), 
debugstr_w(squished_pc));
 
     if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, szInstaller_LocalClassesFeatures, 0, 
access, &hkey)) return ERROR_SUCCESS;
-    r = RegDeleteTreeW(hkey, squished_pc);
+    r = SHDeleteKeyW(hkey, squished_pc);
     RegCloseKey(hkey);
     return r;
 }
@@ -999,7 +999,7 @@
     TRACE("%s squished %s\n", debugstr_w(szUpgradeCode), 
debugstr_w(squished_pc));
 
     if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, szInstaller_ClassesUpgradeCodes, 0, 
access, &hkey)) return ERROR_SUCCESS;
-    r = RegDeleteTreeW(hkey, squished_pc);
+    r = SHDeleteKeyW(hkey, squished_pc);
     RegCloseKey(hkey);
     return r;
 }


Reply via email to