forked from pennmanor/wix-wrapper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathunchecky.wxs
79 lines (76 loc) · 4.43 KB
/
unchecky.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
<?xml version='1.0'?>
<?define ProductVersion = "1.1.0"?> <!-- Match Unchecky version -->
<?define PrevProductVersion = "1.0.3"?> <!-- Match previous Unchecky version -->
<?define ExeSourceFile = "unchecky_setup.exe"?> <!-- Match new .exe -->
<?define ProductCode = "770B19C5-DC85-4EDC-B468-F6D9B6549C9B"?> <!-- Regenerate for new upgrade -->
<?define ProductUpgradeCode = "F209E059-64FE-4CDF-B8B7-171D23198BB1"?> <!-- When upgrading, move previous ProductCode here -->
<Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'>
<Product Id='*'
UpgradeCode="$(var.ProductUpgradeCode)"
Name='Unchecky'
Language='1033'
Version='$(var.ProductVersion)'
Manufacturer='Reason Software Company Inc.'>
<Package Id='$(var.ProductCode)'
Description='Unchecky v$(var.ProductVersion)'
InstallerVersion='200'
Compressed='yes' />
<Media Id='1' Cabinet='setup.cab' EmbedCab='yes' />
<Directory Id='TARGETDIR' Name='SourceDir'>
<Directory Id="TempFolder">
<Directory Id="INSTALLLOCATION" Name="~_tmpdir">
<Component Id='MyComponent' DiskId='1' Guid='25E6F9B7-E34C-4ECB-8AAC-1A02FB6B396B'>
<File Id="File0" Name="$(var.ExeSourceFile)" Source="$(var.ExeSourceFile)" />
</Component>
</Directory>
</Directory>
</Directory>
<Upgrade Id="$(var.ProductUpgradeCode)">
<UpgradeVersion Minimum="$(var.ProductVersion)"
IncludeMinimum="no"
OnlyDetect="yes"
Language="1033"
Property="NEWPRODUCTFOUND" />
<UpgradeVersion Minimum="$(var.PrevProductVersion)"
IncludeMinimum="yes"
Maximum="$(var.ProductVersion)"
IncludeMaximum="no"
Language="1033"
Property="UPGRADEFOUND" />
</Upgrade>
<Property Id="ARPSYSTEMCOMPONENT" Value="1" />
<Property Id="INSTALLFOLDER">
<RegistrySearch Id='InstallPathRegistry' Type='raw'
Root='HKLM' Key='Software\Microsoft\Windows\CurrentVersion\Uninstall\Unchecky' Name='InstallLocation' Win64='no' />
</Property>
<Feature Id='InstallFeature' Title='Install Feature' Level='1'>
<ComponentRef Id='MyComponent' />
</Feature>
<!-- Prevent downgrading -->
<CustomAction Id="PreventDowngrading" Error="Newer version already installed." />
<InstallUISequence>
<Custom Action="PreventDowngrading" After="FindRelatedProducts">NEWPRODUCTFOUND</Custom>
</InstallUISequence>
<!-- Run Action -->
<CustomAction Id="RunWrapExe"
Return="check"
Execute="deferred"
FileKey="File0"
ExeCommand="-install -no_desktop_icon -from_msi"
HideTarget="no"
Impersonate="no" />
<CustomAction Id="RunUninstaller"
Return="ignore"
Execute="deferred"
Directory="INSTALLLOCATION"
ExeCommand=""[INSTALLFOLDER]\uninstall.exe" -uninstall -path "[INSTALLFOLDER]" -copy_to_temp_dir -delsettings -from_msi"
HideTarget="no"
Impersonate="no" />
<InstallExecuteSequence>
<Custom Action="PreventDowngrading" After="FindRelatedProducts">NEWPRODUCTFOUND</Custom>
<Custom Action="RunWrapExe" After="InstallFiles">NOT REMOVE~="ALL"</Custom>
<Custom Action="RunUninstaller" After="InstallFiles">REMOVE~="ALL"</Custom>
<RemoveExistingProducts After="InstallFinalize" />
</InstallExecuteSequence>
</Product>
</Wix>