summaryrefslogtreecommitdiff
path: root/packaging/wix/Prerequisites.wxi
blob: 49de0c53f3f17ee8cda3a36a374700e096d1c7ab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
<?xml version="1.0" encoding="utf-8"?>
<Include xmlns:netfx="http://schemas.microsoft.com/wix/NetFxExtension">

  <!-- Check for required dependencies here -->
  <Fragment>

    <!-- Do not remove: The contents of this "fragment" will not be included in the project,
         unless we reference at least one item defined within it.
         This "IncludePrerequisites" property is referenced in the "Product" element,
         to ensure the entire fragment is included. -->
    <Property Id="IncludePrerequisites">1</Property>

    <Condition Message="Windows 2000 is no longer supported. Please install $(var.WiresharkName) 1.2 or 1.0 instead.">
      <![CDATA[Installed OR (VersionNT < 500) OR (VersionNT > 500)]]>
    </Condition>

    <Condition Message="WindowsXP is no longer supported. Please install $(var.WiresharkName) 1.12 or 1.10 instead.">
      <![CDATA[Installed OR (VersionNT < 501) OR (VersionNT > 501)]]>
    </Condition>

    <Condition Message="Windows Server 2003 is no longer supported. Please install $(var.WiresharkName) 1.12 or 1.10 instead.">
      <![CDATA[Installed OR (VersionNT < 502) OR (VersionNT > 502)]]>
    </Condition>

    <Condition Message="$(var.WiresharkName)$(var.WiresharkVersion) is only supported on Windows Vista, Windows Server 2008, or higher.">
      <![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>