-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathChocoMSIWrap.wxs
48 lines (41 loc) · 2.77 KB
/
ChocoMSIWrap.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
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<?define ProductName="MSI Wrapper for Chocolatey" ?>
<?define ProductVersion="0.1.0" ?>
<?define ProductCode="b4602cd5-2ce4-4abb-8058-6f4455503e1d"?>
<?define UpgradeCode="5043ae53-30fe-45eb-b879-88e7faa0a271"?>
<?define Manufacturer="Alexander Georgievskiy"?>
<Product Id="$(var.ProductCode)" Name="$(var.ProductName)" Language="1033" Version="$(var.ProductVersion)" Manufacturer="$(var.Manufacturer)" UpgradeCode="$(var.UpgradeCode)">
<Package InstallerVersion="200" Compressed="yes"/>
<Property Id="MSIFASTINSTALL" Value="1" />
<Property Id="DISABLEROLLBACK" Value="1" />
<!-- <Property Id='ARPSYSTEMCOMPONENT'>1</Property> -->
<MajorUpgrade AllowDowngrades="yes"/>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="CommonAppDataFolder">
<Directory Id="PACKAGECACHE" Name="Package Cache">
<Directory Id="INSTALLLOCATION" Name="{$(var.ProductCode)}">
<Component Id="ChocoMSIWrap" Guid="affd77d1-b35c-46f3-a97f-1686dc57b8b8">
</Component>
</Directory>
</Directory>
</Directory>
</Directory>
<Feature Id="ChocoMSIWrapInstall" Title="ChocoMSIWrapSetup" Level="1">
<ComponentRef Id="ChocoMSIWrap" />
</Feature>
<SetProperty Id="ChocolateyExecutableLocation" Value="[%ChocolateyInstall]\choco.exe" Before="InstallInitialize" Sequence="execute" />
<CustomAction Id='InstallAction' ExeCommand='install -y [CHOCOLATEYPACKAGE]' Property="ChocolateyExecutableLocation" Execute='immediate' Return='check'/>
<CustomAction Id='UninstallAction' ExeCommand='uninstall -y [CHOCOLATEYPACKAGE]' Property="ChocolateyExecutableLocation" Execute='immediate' Return='check'/>
<CustomAction Id='UpdateAction' ExeCommand='upgrade -y [CHOCOLATEYPACKAGE]' Property="ChocolateyExecutableLocation" Execute='immediate' Return='check'/>
<!-- <CustomAction Id='ChangeAction' Directory='ProgramFilesFolder' ExeCommand='ChangeAction' Execute='immediate' Return='check'/>
<CustomAction Id='RepairAction' Directory='ProgramFilesFolder' ExeCommand='RepairAction' Execute='immediate' Return='check'/> -->
<InstallExecuteSequence>
<Custom Action='InstallAction' After='InstallFinalize'>NOT Installed AND NOT WIX_UPGRADE_DETECTED</Custom>
<Custom Action='UninstallAction' Before="RemoveFiles">REMOVE AND NOT UPGRADINGPRODUCTCODE</Custom>
<Custom Action='UpdateAction' Before="RemoveFiles">UPGRADINGPRODUCTCODE</Custom>
<!-- <Custom Action='ChangeAction' After='InstallFinalize'>Installed AND NOT REINSTALL AND NOT UPGRADINGPRODUCTCODE AND NOT REMOVE</Custom>
<Custom Action='RepairAction' After='InstallFinalize'>REINSTALL</Custom> -->
</InstallExecuteSequence>
</Product>
</Wix>