[RAPPS] Fix uninstalling applications

- 'WindowsInstaller' setups do not fill the UninstallString and ModifyPath with the needed info, so manually calculate those.
- Fix the case where REG_EXPAND_SZ is used instead of REG_SZ
- Take NoModify into account
This commit is contained in:
Mark Jansen 2022-03-15 21:56:01 +01:00
parent 40fe3e5dd9
commit 1eed7ca9a9
No known key found for this signature in database
GPG key ID: B39240EE84BEAE8B
2 changed files with 63 additions and 5 deletions

View file

@ -247,7 +247,7 @@ BOOL GetInstalledVersion_WowUser(ATL::CStringW* szVersionResult,
BOOL bHasSucceded = FALSE;
ATL::CRegKey key;
ATL::CStringW szVersion;
ATL::CStringW szPath = ATL::CStringW(L"Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\%ls") + szRegName;
ATL::CStringW szPath = ATL::CStringW(L"Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\") + szRegName;
if (key.Open(IsUserKey ? HKEY_CURRENT_USER : HKEY_LOCAL_MACHINE,
szPath.GetString(),