Hugh McMaster : appwiz.cpl: Remove list entries left over from an earlier uninstall.

Alexandre Julliard julliard at winehq.org
Tue Feb 28 03:45:55 CST 2017


Module: wine
Branch: oldstable
Commit: 64d37d9482c259a9b0e8bb062aec741e8914b014
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=64d37d9482c259a9b0e8bb062aec741e8914b014

Author: Hugh McMaster <hugh.mcmaster at outlook.com>
Date:   Fri Dec 16 12:20:40 2016 +0000

appwiz.cpl: Remove list entries left over from an earlier uninstall.

Signed-off-by: Hugh McMaster <hugh.mcmaster at outlook.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
(cherry picked from commit 537768b67520408d97ab032cd4bcc6c6d39105b1)
Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>

---

 dlls/appwiz.cpl/appwiz.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/dlls/appwiz.cpl/appwiz.c b/dlls/appwiz.cpl/appwiz.c
index 9d53e79..dd84827 100644
--- a/dlls/appwiz.cpl/appwiz.c
+++ b/dlls/appwiz.cpl/appwiz.c
@@ -298,7 +298,7 @@ static BOOL ReadApplicationsFromRegistry(HKEY root)
             }
 
             /* registry key */
-            info->regroot = root;
+            RegOpenKeyExW(root, NULL, 0, KEY_READ, &info->regroot);
             lstrcpyW(info->regkey, subKeyName);
             info->path = command;
 
@@ -497,7 +497,6 @@ static void UninstallProgram(int id, DWORD button)
     PROCESS_INFORMATION info;
     WCHAR errormsg[MAX_STRING_LEN];
     WCHAR sUninstallFailed[MAX_STRING_LEN];
-    HKEY hkey;
     BOOL res;
 
     LoadStringW(hInst, IDS_UNINSTALL_FAILED, sUninstallFailed,
@@ -533,9 +532,8 @@ static void UninstallProgram(int id, DWORD button)
                     MB_ICONQUESTION) == IDYES)
                 {
                     /* delete the application's uninstall entry */
-                    RegOpenKeyExW(iter->regroot, PathUninstallW, 0, KEY_READ, &hkey);
-                    RegDeleteKeyW(hkey, iter->regkey);
-                    RegCloseKey(hkey);
+                    RegDeleteKeyW(iter->regroot, iter->regkey);
+                    RegCloseKey(iter->regroot);
                 }
             }
 




More information about the wine-cvs mailing list