forked from snoopwpf/snoopwpf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Product.wxs
163 lines (144 loc) · 5.98 KB
/
Product.wxs
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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http:https://schemas.microsoft.com/wix/2006/wi">
<!-- ID="*" will generate a new GUID for product code at time of build. -->
<!-- Product code changes AND version number changes (first 3 digits), then a major upgrade will be triggered. -->
<!-- One spot to update version :) -->
<?define ProductVersion="2.8.0" ?>
<Product
Id="*"
Name="Snoop"
Manufacturer="Cory Plotts"
Language="1033"
Version="$(var.ProductVersion)"
UpgradeCode="FBEC01D7-CE1B-46F4-9498-71A96FEA8A15"
>
<Package InstallerVersion="301" Compressed="yes"/>
<!-- Rules for upgrading. ID must be the same as the packages to be checked/uninstalled. -->
<Upgrade Id="FBEC01D7-CE1B-46F4-9498-71A96FEA8A15">
<!-- If the installed version is $(var.ProductVersion) or higher, then set the property "NEWPRODUCTFOUND". This will trigger a "PreventDowngrading" Custom action. -->
<UpgradeVersion Minimum="$(var.ProductVersion)" IncludeMinimum="no" OnlyDetect="yes" Language="1033" Property="NEWPRODUCTFOUND"/>
<!-- If the installed version is between 1.0.0 and $(var.ProductVersion), then set "PREVIOUSVERSIONINSTALLED" properity. This will trigger RemoveExistingProducts. -->
<UpgradeVersion Minimum="1.0.0" IncludeMinimum="yes" Maximum="$(var.ProductVersion)" IncludeMaximum="no" Language="1033" Property="PREVIOUSVERSIONSINSTALLED"/>
</Upgrade>
<InstallExecuteSequence>
<!-- After we locate related products (listed by UpgradeCode in Upgrade table), launch custom action if NEWPRODUCTFOUND is set. -->
<Custom Action="PreventDowngrading" After="FindRelatedProducts">NEWPRODUCTFOUND</Custom>
<!-- Move RemoveExistingProducts to after InstallInitalize. This allows an upgrade to rollback to the previous version if there is an error. -->
<RemoveExistingProducts After="InstallInitialize">PREVIOUSVERSIONSINSTALLED</RemoveExistingProducts>
</InstallExecuteSequence>
<!-- Will prompt user that a Newer version is already installed.-->
<CustomAction Id="PreventDowngrading" Error="Newer version already installed."/>
<Property Id="WIXUI_INSTALLDIR" Value="INSTALLDIR"/>
<Media Id="1" Cabinet="media1.cab" EmbedCab="yes"/>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="INSTALLDIR" Name="Snoop">
<Component Id="Snoop" Guid="5624FD27-2409-4E5A-86E1-7C1A9C52A2F4">
<File
Id="SnoopEXE"
Name="Snoop.exe"
Source="..\Build\Release\Snoop.exe"
KeyPath="yes"
>
<Shortcut
Id="desktopSnoopShortcut"
Directory="DesktopFolder"
Name="Snoop $(var.ProductVersion)"
WorkingDirectory="INSTALLDIR"
Icon="Snoop.exe"
IconIndex="0"
Advertise="yes"
/>
<Shortcut
Id="startMenuSnoopShortcut"
Directory="ProgramMenuDir"
Name="Snoop $(var.ProductVersion)"
WorkingDirectory="INSTALLDIR"
Icon="Snoop.exe"
IconIndex="0"
Advertise="yes"
/>
</File>
<File
Id="SnoopCFG"
Name="Snoop.exe.config"
Source="..\Build\Release\Snoop.exe.config"
/>
<File
Id="ManagedInjectorLauncher3235"
Name="ManagedInjectorLauncher32-3.5.exe"
Source="..\Build\Release\ManagedInjectorLauncher32-3.5.exe"
/>
<File
Id="ManagedInjector3235"
Name="ManagedInjector32-3.5.dll"
Source="..\Build\Release\ManagedInjector32-3.5.dll"
/>
<File
Id="ManagedInjectorLauncher3240"
Name="ManagedInjectorLauncher32-4.0.exe"
Source="..\Build\Release\ManagedInjectorLauncher32-4.0.exe"
/>
<File
Id="ManagedInjector3240"
Name="ManagedInjector32-4.0.dll"
Source="..\Build\Release\ManagedInjector32-4.0.dll"
/>
<File
Id="ManagedInjectorLauncher6435"
Name="ManagedInjectorLauncher64-3.5.exe"
Source="..\Build\Release\ManagedInjectorLauncher64-3.5.exe"
/>
<File
Id="ManagedInjector6435"
Name="ManagedInjector64-3.5.dll"
Source="..\Build\Release\ManagedInjector64-3.5.dll"
/>
<File
Id="ManagedInjectorLauncher6440"
Name="ManagedInjectorLauncher64-4.0.exe"
Source="..\Build\Release\ManagedInjectorLauncher64-4.0.exe"
/>
<File
Id="ManagedInjector6440"
Name="ManagedInjector64-4.0.dll"
Source="..\Build\Release\ManagedInjector64-4.0.dll"
/>
</Component>
<Directory Id="SnoopScriptsFolder" Name="Scripts">
<Component Id="SnoopScriptsComponent" Guid="65AD97C3-5B32-4020-892C-1D0E38656D6D">
<File
Id="SnoopScriptsFile"
Name="Snoop.psm1"
Source="..\Build\Release\Scripts\Snoop.psm1"
/>
</Component>
</Directory>
</Directory>
</Directory>
<Directory Id="ProgramMenuFolder" Name="Programs">
<Directory Id="ProgramMenuDir" Name="Snoop">
<Component Id="ProgramMenuDir" Guid="F04C55F5-09D6-40CD-90E3-FA46E5E4A93D">
<RemoveFolder Id='ProgramMenuDir' On='uninstall'/>
<RegistryValue Root='HKCU' Key='Software\[ProductName]' Type='string' Value='' KeyPath='yes'/>
</Component>
</Directory>
</Directory>
<Directory Id="DesktopFolder" Name="Desktop"/>
</Directory>
<Feature Id="ProductFeature" Title="Snoop" Description="Snoop, the WPF Spying Utility" Level="1" ConfigurableDirectory="INSTALLDIR">
<ComponentRef Id="Snoop"/>
<ComponentRef Id="SnoopScriptsComponent"/>
<ComponentRef Id="ProgramMenuDir"/>
</Feature>
<UIRef Id="WixUI_InstallDir"/>
<WixVariable Id="WixUILicenseRtf" Value="License.rtf"/>
<WixVariable Id="WixUIBannerBmp" Value="Bitmaps\Banner.bmp"/>
<WixVariable Id="WixUIDialogBmp" Value="Bitmaps\Dialog.bmp"/>
<WixVariable Id="WixUIExclamationIco" Value="Bitmaps\Exclamation.ico"/>
<WixVariable Id="WixUIInfoIco" Value="Bitmaps\Information.ico"/>
<WixVariable Id="WixUINewIco" Value="Bitmaps\New.ico"/>
<WixVariable Id="WixUIUpIco" Value="Bitmaps\Up.ico"/>
<Icon Id="Snoop.exe" SourceFile="..\Build\Release\Snoop.exe"/>
</Product>
</Wix>