aboutsummaryrefslogtreecommitdiffstats
path: root/packaging/wix
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2016-09-13 17:07:15 -0700
committerMichael Mann <mmann78@netscape.net>2016-09-19 02:49:53 +0000
commit630b64613567c268b2b08966707c81d3ec8661a5 (patch)
treef11766803b401b172d1439041b8ccac30b6d0a27 /packaging/wix
parentdf2f01a60bed267117c8c46dea4259dc7e2e995c (diff)
WiX: Add NSIS installer checks.
Look for an existing NSIS installation and cancel the installation if we find one. Add a note about making this process more friendly. Change-Id: Id6ea4d511bc813a38fa834931f5e677d3d6a4319 Reviewed-on: https://code.wireshark.org/review/17702 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gilbert Ramirez <gram@alumni.rice.edu>
Diffstat (limited to 'packaging/wix')
-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" />