From 5dfedc150d92b381efca24027ebdd0fb80f38f94 Mon Sep 17 00:00:00 2001 From: LoRd_MuldeR Date: Thu, 6 Aug 2015 21:08:48 +0200 Subject: [PATCH] Some improvements to ShellExtension *removal* code. --- src/ShellIntegration.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/ShellIntegration.cpp b/src/ShellIntegration.cpp index eeb6e21b..bea62c05 100644 --- a/src/ShellIntegration.cpp +++ b/src/ShellIntegration.cpp @@ -161,6 +161,21 @@ void ShellIntegration::remove(bool async) //Remove shell action from all file types for(QStringList::ConstIterator iter = fileTypes.constBegin(); iter != fileTypes.constEnd(); iter++) { + //Remove LameXP-specific types altogether + if(iter->startsWith('.')) + { + QString currentFileType; + if(MUtils::Registry::reg_value_read(MUtils::Registry::root_user, QString("Software\\Classes\\%1").arg(*iter), QString(), currentFileType)) + { + if(currentFileType.compare(lamexpFileType, Qt::CaseInsensitive) == 0) + { + MUtils::Registry::reg_key_delete(MUtils::Registry::root_user, QString("Software\\Classes\\%1").arg(*iter)); + continue; + } + } + } + + //Remove shell action for non-LameXP types MUtils::Registry::reg_key_delete(MUtils::Registry::root_user, QString("Software\\Classes\\%1\\shell\\%2").arg((*iter), lamexpShellAction)); //Remove from sub-tree too