diff --git a/CHANGELOG.md b/CHANGELOG.md index da81ff39..4ea4988c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). +## [1.14.11 / 5.69.11] - 2024-10- + +### Fixed +- fixed ImDiskApp uninstall key is always written to the registry [#4282](https://github.com/sandboxie-plus/Sandboxie/issues/4282) + + + + ## [1.14.10 / 5.69.10] - 2024-10-03 ### Added diff --git a/Sandboxie/common/my_version.h b/Sandboxie/common/my_version.h index 87130e40..d379f033 100644 --- a/Sandboxie/common/my_version.h +++ b/Sandboxie/common/my_version.h @@ -26,7 +26,7 @@ #define VERSION_MJR 5 #define VERSION_MIN 69 -#define VERSION_REV 10 +#define VERSION_REV 11 #define VERSION_UPD 0 #if VERSION_UPD > 0 diff --git a/SandboxiePlus/QSbieAPI/Sandboxie/SbieTemplates.cpp b/SandboxiePlus/QSbieAPI/Sandboxie/SbieTemplates.cpp index 2bc46b4d..bae6e7a6 100644 --- a/SandboxiePlus/QSbieAPI/Sandboxie/SbieTemplates.cpp +++ b/SandboxiePlus/QSbieAPI/Sandboxie/SbieTemplates.cpp @@ -424,6 +424,14 @@ bool CSbieTemplates::CheckRegistryKey(const QString& Value) { std::wstring keypath = Value.toStdWString(); + if (keypath.find(L"HKEY_LOCAL_MACHINE") == 0) keypath.replace(0, wcslen(L"HKEY_LOCAL_MACHINE"), L"\\REGISTRY\\MACHINE"); + else if (keypath.find(L"HKEY_CLASSES_ROOT") == 0) keypath.replace(0, wcslen(L"HKEY_CLASSES_ROOT"), L"\\REGISTRY\\MACHINE\\SOFTWARE\\Classes"); + //else if (keypath.find(L"HKEY_CURRENT_USER") == 0) keypath.replace(0, wcslen(L"HKEY_CURRENT_USER"), L"\\REGISTRY\\USER" + SID); + else if (keypath.find(L"HKEY_USERS") == 0) keypath.replace(0, wcslen(L"HKEY_USERS"), L"\\REGISTRY\\USER"); + //else if (keypath.find(L"HKEY_CURRENT_CONFIG") == 0) keypath.replace(0, wcslen(L"HKEY_CURRENT_CONFIG"), L"\\REGISTRY\\MACHINE\\SYSTEM\\CurrentControlSet\\Hardware Profiles\\Current"); + else + return false; + OBJECT_ATTRIBUTES objattrs; UNICODE_STRING objname; RtlInitUnicodeString(&objname, keypath.c_str()); diff --git a/SandboxiePlus/QSbieAPI/Sandboxie/SbieTemplates.h b/SandboxiePlus/QSbieAPI/Sandboxie/SbieTemplates.h index 97073b53..c8f98c06 100644 --- a/SandboxiePlus/QSbieAPI/Sandboxie/SbieTemplates.h +++ b/SandboxiePlus/QSbieAPI/Sandboxie/SbieTemplates.h @@ -35,7 +35,7 @@ public: QString ExpandPath(QString path); - bool CheckRegistryKey(const QString& Value); + static bool CheckRegistryKey(const QString& Value); bool CheckFile(const QString& Value); bool CheckClasses(const QString& Value); bool CheckServices(const QString& Value); diff --git a/SandboxiePlus/SandMan/AddonManager.cpp b/SandboxiePlus/SandMan/AddonManager.cpp index 5ef7f34c..aea12621 100644 --- a/SandboxiePlus/SandMan/AddonManager.cpp +++ b/SandboxiePlus/SandMan/AddonManager.cpp @@ -82,9 +82,7 @@ QList CAddonManager::GetAddons() QString Key = pAddon->GetSpecificEntry("uninstallKey").toString(); if (!Key.isEmpty()) { - QSettings settings(Key, QSettings::NativeFormat); - QString Uninstall = settings.value("UninstallString").toString(); - if (!Uninstall.isEmpty()) { + if(CSbieTemplates::CheckRegistryKey(Key)) { Installed = true; m_Installed.append(CAddonPtr(new CAddon(pAddon->Data))); } @@ -138,11 +136,8 @@ CAddonPtr CAddonManager::GetAddon(const QString& Id, EState State) /*bool CAddonManager::CheckAddon(const CAddonPtr& pAddon) { QString Key = pAddon->GetSpecificEntry("uninstallKey").toString(); - if (!Key.isEmpty()) { - QSettings settings(Key, QSettings::NativeFormat); - QString Uninstall = settings.value("UninstallString").toString(); - return !Uninstall.isEmpty(); - } + if (!Key.isEmpty()) + return CSbieTemplates::CheckRegistryKey(Key); / *QStringList Files = pAddon->GetSpecificEntry("files").toStringList(); foreach(const QString & File, Files) { diff --git a/SandboxiePlus/version.h b/SandboxiePlus/version.h index 4763080c..967f1dcc 100644 --- a/SandboxiePlus/version.h +++ b/SandboxiePlus/version.h @@ -2,7 +2,7 @@ #define VERSION_MJR 1 #define VERSION_MIN 14 -#define VERSION_REV 10 +#define VERSION_REV 11 #define VERSION_UPD 0 #ifndef STR