summaryrefslogtreecommitdiff
path: root/packaging
diff options
context:
space:
mode:
Diffstat (limited to 'packaging')
-rw-r--r--packaging/wix/Prerequisites.wxi72
-rw-r--r--packaging/wix/Wireshark.wxs3
2 files changed, 73 insertions, 2 deletions
diff --git a/packaging/wix/Prerequisites.wxi b/packaging/wix/Prerequisites.wxi
index 820d167b87..49de0c53f3 100644
--- a/packaging/wix/Prerequisites.wxi
+++ b/packaging/wix/Prerequisites.wxi
@@ -26,5 +26,77 @@
<![CDATA[Installed OR (VersionNT >= 600)]]>
</Condition>
+<!--
+ NSIS package uninstallation. The NSIS installer writes a bunch of keys to
+ 'HKEY_LOCAL_MACHINE\SOFTWARE\{Wow6432Node\,}Microsoft\Windows\CurrentVersion\Uninstall\Wireshark'.
+ See the 'WriteRegStr HKEY_LOCAL_MACHINE "${UNINSTALL_PATH}"' statements
+ starting at around line 780 in nsis\wireshark.nsi for a complete list.
+
+ For now look for 'InstallLocation' and cancel the installation if
+ it's defined and exists. Next steps:
+ - look for 'QuietUninstallString' and offer to run it.
+ - Show properties in condition messages as described below.
+-->
+
+ <Property Id="NSIS_INSTALL_LOCATION_32" Secure="yes">
+ <RegistrySearch Id='NsisInstallRegistrySearch32'
+ Type='raw'
+ Root='HKLM'
+ Key='SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Wireshark'
+ Name='InstallLocation'
+ Win64='no'>
+ <DirectorySearch Id='NsisInstallDirectorySearch32' AssignToProperty='yes'/>
+ </RegistrySearch>
+ </Property>
+
+ <!-- XXX It looks like messages are compiled before properties are evaluated.
+ <Property Id="NSIS_DISPLAY_NAME_32" Value="Wireshark" Secure="yes">
+ <RegistrySearch Id='NsisDisplayNameRegistrySearch32'
+ Type='raw'
+ Root='HKLM'
+ Key='SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Wireshark'
+ Name='DisplayName'
+ Win64='no'/>
+ </Property>
+
+ <Condition Message="[NSIS_DISPLAY_NAME_32] is installed in [NSIS_INSTALL_LOCATION_32]. Please uninstall it using Programs and Features.">
+ <![CDATA[Installed OR NSIS_INSTALL_LOCATION_32]]>
+ </Condition>
+ -->
+
+ <Condition Message="Wireshark was installed using the .exe installer. Please uninstall it using Programs and Features.">
+ <![CDATA[Installed OR NSIS_INSTALL_LOCATION_32]]>
+ </Condition>
+
+ <Property Id="NSIS_DISPLAY_NAME_64" Value="Wireshark" Secure="yes">
+ <RegistrySearch Id='NsisDisplayNameRegistrySearch64'
+ Type='raw'
+ Root='HKLM'
+ Key='SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Wireshark'
+ Name='DisplayName'
+ Win64='yes'/>
+ </Property>
+
+ <!-- XXX It looks like messages are compiled before properties are evaluated.
+ <Property Id="NSIS_INSTALL_LOCATION_64" Secure="yes">
+ <RegistrySearch Id='NsisInstallRegistrySearch64'
+ Type='raw'
+ Root='HKLM'
+ Key='SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Wireshark'
+ Name='InstallLocation'
+ Win64='yes'>
+ <DirectorySearch Id='NsisInstallDirectorySearch64' AssignToProperty='yes'/>
+ </RegistrySearch>
+ </Property>
+
+ <Condition Message="[NSIS_DISPLAY_NAME_64] is installed in [NSIS_INSTALL_LOCATION_64]. Please uninstall it using Programs and Features.">
+ <![CDATA[Installed OR NSIS_INSTALL_LOCATION_64]]>
+ </Condition>
+ -->
+
+ <Condition Message="Wireshark was installed using the .exe installer. Please uninstall it using Programs and Features.">
+ <![CDATA[Installed OR NSIS_INSTALL_LOCATION_64]]>
+ </Condition>
+
</Fragment>
</Include>
diff --git a/packaging/wix/Wireshark.wxs b/packaging/wix/Wireshark.wxs
index 24154b1595..a2fbcd37db 100644
--- a/packaging/wix/Wireshark.wxs
+++ b/packaging/wix/Wireshark.wxs
@@ -13,7 +13,6 @@
.ico file instead of pointing to wireshark.exe.
-->
<?define ProgramsFeaturesIconPath="$(var.IconDir)\wireshark.ico"?>
-
<Product Id="*" Name="$(var.WiresharkName)" Language="1033" Version="$(var.WiresharkVersion)" Manufacturer="The Wireshark developer community, http://www.wireshark.org/" UpgradeCode="0d67aace-269a-4264-81a3-da8055c1c79c">
<Package InstallerVersion="405" Compressed="yes" InstallScope="perMachine" />
<!-- Values for Additional Tasks -->
@@ -26,7 +25,7 @@
<Property Id="WIRESHARK_FILE_EXTENSIONS" Value="0"/>
<MajorUpgrade DowngradeErrorMessage="A newer version of $(var.WiresharkName) is already installed." />
- <MediaTemplate EmbedCab="yes" CompressionLevel="high" />
+ <MediaTemplate EmbedCab="yes" CompressionLevel="high" />
<!-- Include the prerequisites, by referencing the placeholder property -->
<PropertyRef Id="IncludePrerequisites" />