From 634b171b97b6f21b09593f9c75f7b5965f8017a1 Mon Sep 17 00:00:00 2001 From: Alex Pyrgiotis Date: Tue, 8 Apr 2025 12:30:54 +0300 Subject: [PATCH] windows: Detect Dangerzone 0.8.1 during install Detect Dangerzone 0.8.1 versions during install, so that we can prompt users to manually uninstall it. Refs #929 --- install/windows/build-wxs.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/install/windows/build-wxs.py b/install/windows/build-wxs.py index 33a4622..e0b37d5 100644 --- a/install/windows/build-wxs.py +++ b/install/windows/build-wxs.py @@ -193,7 +193,7 @@ def main(): Path="C:\\Program Files (x86)\\Dangerzone", ) ET.SubElement(directory_search_el, "FileSearch", Name="dangerzone.exe") - registry_search_el = ET.SubElement(package_el, "Property", Id="DANGERZONE080FOUND") + registry_search_el = ET.SubElement(package_el, "Property", Id="DANGERZONE08FOUND") ET.SubElement( registry_search_el, "RegistrySearch", @@ -202,10 +202,18 @@ def main(): Name="DisplayName", Type="raw", ) + ET.SubElement( + registry_search_el, + "RegistrySearch", + Root="HKLM", + Key="SOFTWARE\\WOW6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\{8AAC0808-3556-4164-9D15-6EC1FB673AB2}", + Name="DisplayName", + Type="raw", + ) ET.SubElement( package_el, "Launch", - Condition="NOT OLDDANGERZONEFOUND AND NOT DANGERZONE080FOUND", + Condition="NOT OLDDANGERZONEFOUND AND NOT DANGERZONE08FOUND", Message="A previous version of [ProductName] is already installed. Please uninstall it from Programs and Features before proceeding with the installation.", )