- Add enumeration user keys

svn path=/trunk/; revision=42872
This commit is contained in:
Dmitry Chapyshev 2009-08-23 07:40:23 +00:00
parent f6d5c06f8c
commit 4abf644be8
3 changed files with 5 additions and 4 deletions

View file

@ -172,7 +172,7 @@ ShowInstalledAppInfo(INT Index)
BOOL
EnumInstalledApplications(INT EnumType, APPENUMPROC lpEnumProc)
EnumInstalledApplications(INT EnumType, BOOL IsUserKey, APPENUMPROC lpEnumProc)
{
DWORD dwSize = MAX_PATH, dwType, dwValue;
BOOL bIsSystemComponent, bIsUpdate;
@ -182,7 +182,7 @@ EnumInstalledApplications(INT EnumType, APPENUMPROC lpEnumProc)
HKEY hKey, hSubKey;
LONG ItemIndex = 0;
if (RegOpenKeyW(HKEY_LOCAL_MACHINE,
if (RegOpenKeyW(IsUserKey ? HKEY_CURRENT_USER : HKEY_LOCAL_MACHINE,
L"Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall",
&hKey) != ERROR_SUCCESS)
{

View file

@ -76,7 +76,7 @@ BOOL InstallApplication(INT Index);
/* installed.c */
typedef BOOL (CALLBACK *APPENUMPROC)(INT ItemIndex, LPWSTR lpName, LPWSTR lpKeyName, LPARAM lParam);
BOOL EnumInstalledApplications(INT EnumType, APPENUMPROC lpEnumProc);
BOOL EnumInstalledApplications(INT EnumType, BOOL IsUserKey, APPENUMPROC lpEnumProc);
BOOL GetApplicationString(HKEY hKey, LPWSTR lpKeyName, LPWSTR lpString);
BOOL ShowInstalledAppInfo(INT Index);
BOOL UninstallApplication(INT Index, BOOL bModify);

View file

@ -101,7 +101,8 @@ UpdateApplicationsList(INT EnumType)
if (IS_INSTALLED_ENUM(EnumType))
{
/* Enum installed applications and updates */
EnumInstalledApplications(EnumType, EnumInstalledAppProc);
EnumInstalledApplications(EnumType, TRUE, EnumInstalledAppProc);
EnumInstalledApplications(EnumType, FALSE, EnumInstalledAppProc);
}
else if (IS_AVAILABLE_ENUM(EnumType))
{