Hans Leidekker : appwiz.cpl: Don't list system components.

Alexandre Julliard julliard at winehq.org
Mon May 30 12:41:17 CDT 2011


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

Author: Hans Leidekker <hans at codeweavers.com>
Date:   Mon May 30 09:28:31 2011 +0200

appwiz.cpl: Don't list system components.

---

 dlls/appwiz.cpl/appwiz.c |   14 +++++++++++---
 1 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/dlls/appwiz.cpl/appwiz.c b/dlls/appwiz.cpl/appwiz.c
index 957b8bf..48aee45 100644
--- a/dlls/appwiz.cpl/appwiz.c
+++ b/dlls/appwiz.cpl/appwiz.c
@@ -100,6 +100,7 @@ static const WCHAR CommentsW[] = {'C','o','m','m','e','n','t','s',0};
 static const WCHAR UninstallCommandlineW[] = {'U','n','i','n','s','t','a','l','l',
     'S','t','r','i','n','g',0};
 static const WCHAR WindowsInstallerW[] = {'W','i','n','d','o','w','s','I','n','s','t','a','l','l','e','r',0};
+static const WCHAR SystemComponentW[] = {'S','y','s','t','e','m','C','o','m','p','o','n','e','n','t',0};
 
 static const WCHAR PathUninstallW[] = {
         'S','o','f','t','w','a','r','e','\\',
@@ -153,7 +154,7 @@ static BOOL ReadApplicationsFromRegistry(HKEY root)
     HKEY hkeyApp;
     int i, id = 0;
     DWORD sizeOfSubKeyName, displen, uninstlen;
-    DWORD dwNoModify, dwType, value;
+    DWORD dwNoModify, dwType, value, size;
     WCHAR subKeyName[256];
     WCHAR *command;
     APPINFO *info = NULL;
@@ -165,12 +166,19 @@ static BOOL ReadApplicationsFromRegistry(HKEY root)
         NULL, NULL, NULL) != ERROR_NO_MORE_ITEMS; ++i)
     {
         RegOpenKeyExW(root, subKeyName, 0, KEY_READ, &hkeyApp);
-
+        size = sizeof(value);
+        if (!RegQueryValueExW(hkeyApp, SystemComponentW, NULL, &dwType, (LPBYTE)&value, &size)
+            && dwType == REG_DWORD && value == 1)
+        {
+            RegCloseKey(hkeyApp);
+            sizeOfSubKeyName = sizeof(subKeyName) / sizeof(subKeyName[0]);
+            continue;
+        }
         displen = 0;
         uninstlen = 0;
         if (!RegQueryValueExW(hkeyApp, DisplayNameW, 0, 0, NULL, &displen))
         {
-            DWORD size = sizeof(value);
+            size = sizeof(value);
             if (!RegQueryValueExW(hkeyApp, WindowsInstallerW, NULL, &dwType, (LPBYTE)&value, &size)
                 && dwType == REG_DWORD && value == 1)
             {




More information about the wine-cvs mailing list