2017-08-02 12:50:53 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <windef.h>
|
|
|
|
#include <atlstr.h>
|
|
|
|
|
2020-07-21 14:13:39 +00:00
|
|
|
class CInstalledApplicationInfo
|
2017-08-02 12:50:53 +00:00
|
|
|
{
|
2020-07-21 14:13:39 +00:00
|
|
|
public:
|
|
|
|
BOOL IsUserKey;
|
|
|
|
REGSAM WowKey;
|
2017-08-02 12:50:53 +00:00
|
|
|
HKEY hSubKey;
|
2020-07-21 14:13:39 +00:00
|
|
|
BOOL bIsUpdate = FALSE;
|
|
|
|
|
2017-08-02 12:50:53 +00:00
|
|
|
ATL::CStringW szKeyName;
|
2019-04-28 03:27:53 +00:00
|
|
|
|
2020-07-21 14:13:39 +00:00
|
|
|
CInstalledApplicationInfo(BOOL bIsUserKey, REGSAM RegWowKey, HKEY hKey);
|
2020-07-24 08:07:43 +00:00
|
|
|
BOOL GetApplicationRegString(LPCWSTR lpKeyName, ATL::CStringW& String);
|
|
|
|
BOOL GetApplicationRegDword(LPCWSTR lpKeyName, DWORD *lpValue);
|
2020-07-21 14:13:39 +00:00
|
|
|
BOOL UninstallApplication(BOOL bModify);
|
|
|
|
LSTATUS RemoveFromRegistry();
|
|
|
|
|
|
|
|
ATL::CStringW szDisplayName;
|
|
|
|
ATL::CStringW szDisplayVersion;
|
|
|
|
ATL::CStringW szPublisher;
|
|
|
|
ATL::CStringW szRegOwner;
|
|
|
|
ATL::CStringW szProductID;
|
|
|
|
ATL::CStringW szHelpLink;
|
|
|
|
ATL::CStringW szHelpTelephone;
|
|
|
|
ATL::CStringW szReadme;
|
|
|
|
ATL::CStringW szContact;
|
|
|
|
ATL::CStringW szURLUpdateInfo;
|
|
|
|
ATL::CStringW szURLInfoAbout;
|
|
|
|
ATL::CStringW szComments;
|
|
|
|
ATL::CStringW szInstallDate;
|
|
|
|
ATL::CStringW szInstallLocation;
|
|
|
|
ATL::CStringW szInstallSource;
|
|
|
|
ATL::CStringW szUninstallString;
|
|
|
|
ATL::CStringW szModifyPath;
|
|
|
|
|
|
|
|
~CInstalledApplicationInfo();
|
2017-08-02 12:50:53 +00:00
|
|
|
};
|
2017-09-09 20:38:06 +00:00
|
|
|
|
2020-07-21 14:13:39 +00:00
|
|
|
typedef BOOL(CALLBACK *APPENUMPROC)(CInstalledApplicationInfo * Info, PVOID param);
|
2017-08-02 12:50:53 +00:00
|
|
|
|
2020-07-21 14:13:39 +00:00
|
|
|
class CInstalledApps
|
|
|
|
{
|
|
|
|
ATL::CAtlList<CInstalledApplicationInfo *> m_InfoList;
|
|
|
|
|
|
|
|
public:
|
|
|
|
BOOL Enum(INT EnumType, APPENUMPROC lpEnumProc, PVOID param);
|
|
|
|
|
|
|
|
VOID FreeCachedEntries();
|
|
|
|
};
|
2017-08-02 12:50:53 +00:00
|
|
|
|