This commit is contained in:
DavidXanatos 2024-10-09 09:38:57 +02:00
parent b68dcde342
commit 1d0602e0b9
6 changed files with 22 additions and 11 deletions

View File

@ -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/). 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 ## [1.14.10 / 5.69.10] - 2024-10-03
### Added ### Added

View File

@ -26,7 +26,7 @@
#define VERSION_MJR 5 #define VERSION_MJR 5
#define VERSION_MIN 69 #define VERSION_MIN 69
#define VERSION_REV 10 #define VERSION_REV 11
#define VERSION_UPD 0 #define VERSION_UPD 0
#if VERSION_UPD > 0 #if VERSION_UPD > 0

View File

@ -424,6 +424,14 @@ bool CSbieTemplates::CheckRegistryKey(const QString& Value)
{ {
std::wstring keypath = Value.toStdWString(); 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; OBJECT_ATTRIBUTES objattrs;
UNICODE_STRING objname; UNICODE_STRING objname;
RtlInitUnicodeString(&objname, keypath.c_str()); RtlInitUnicodeString(&objname, keypath.c_str());

View File

@ -35,7 +35,7 @@ public:
QString ExpandPath(QString path); QString ExpandPath(QString path);
bool CheckRegistryKey(const QString& Value); static bool CheckRegistryKey(const QString& Value);
bool CheckFile(const QString& Value); bool CheckFile(const QString& Value);
bool CheckClasses(const QString& Value); bool CheckClasses(const QString& Value);
bool CheckServices(const QString& Value); bool CheckServices(const QString& Value);

View File

@ -82,9 +82,7 @@ QList<CAddonInfoPtr> CAddonManager::GetAddons()
QString Key = pAddon->GetSpecificEntry("uninstallKey").toString(); QString Key = pAddon->GetSpecificEntry("uninstallKey").toString();
if (!Key.isEmpty()) { if (!Key.isEmpty()) {
QSettings settings(Key, QSettings::NativeFormat); if(CSbieTemplates::CheckRegistryKey(Key)) {
QString Uninstall = settings.value("UninstallString").toString();
if (!Uninstall.isEmpty()) {
Installed = true; Installed = true;
m_Installed.append(CAddonPtr(new CAddon(pAddon->Data))); 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) /*bool CAddonManager::CheckAddon(const CAddonPtr& pAddon)
{ {
QString Key = pAddon->GetSpecificEntry("uninstallKey").toString(); QString Key = pAddon->GetSpecificEntry("uninstallKey").toString();
if (!Key.isEmpty()) { if (!Key.isEmpty())
QSettings settings(Key, QSettings::NativeFormat); return CSbieTemplates::CheckRegistryKey(Key);
QString Uninstall = settings.value("UninstallString").toString();
return !Uninstall.isEmpty();
}
/ *QStringList Files = pAddon->GetSpecificEntry("files").toStringList(); / *QStringList Files = pAddon->GetSpecificEntry("files").toStringList();
foreach(const QString & File, Files) { foreach(const QString & File, Files) {

View File

@ -2,7 +2,7 @@
#define VERSION_MJR 1 #define VERSION_MJR 1
#define VERSION_MIN 14 #define VERSION_MIN 14
#define VERSION_REV 10 #define VERSION_REV 11
#define VERSION_UPD 0 #define VERSION_UPD 0
#ifndef STR #ifndef STR