-
Notifications
You must be signed in to change notification settings - Fork 33
/
Product.wxs
66 lines (52 loc) · 2.67 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
<?define Name = "DesktopClock"?>
<?define Manufacturer = "Daniel Chalmers"?>
<?define Guid = "6BD5BA59-2419-4A0E-89F8-C6F8A4EA08F7"?>
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
<Package Name="$(var.Name)" Manufacturer="$(var.Manufacturer)" Version="!(bind.FileVersion.MainExe)" UpgradeCode="$(var.Guid)" Language="1033" InstallerVersion="500" Scope="perUser">
<SummaryInformation Manufacturer="$(var.Manufacturer)" />
<Icon Id="Logo.ico" SourceFile="$(var.Name)\$(var.Name).ico" />
<Property Id="ARPPRODUCTICON" Value="Logo.ico" />
<Property Id="ARPNOREPAIR" Value="yes" Secure="yes" />
<Property Id="ARPNOMODIFY" Value="yes" Secure="yes" />
<Media Id="1" Cabinet="App.cab" EmbedCab="yes" />
<Feature Id="ProductFeature" Title="$(var.Name)" Level="1">
<!--Main executable-->
<ComponentGroupRef Id="ProductComponents" />
<!--Program Menu shortcut-->
<ComponentRef Id="ApplicationShortcut" />
</Feature>
<StandardDirectory Id="LocalAppDataFolder">
<Directory Id="INSTALLFOLDER" Name="$(var.Name)" />
</StandardDirectory>
<StandardDirectory Id="ProgramMenuFolder">
<Directory Id="ApplicationProgramsFolder" Name="$(var.Name)" />
</StandardDirectory>
<Property Id="PREVIOUSVERSIONSINSTALLED" Secure="yes" />
<Upgrade Id="$(var.Guid)">
<UpgradeVersion Minimum="0.0.0.0" Maximum="255.0.0.0" Property="PREVIOUSVERSIONSINSTALLED" IncludeMinimum="yes" IncludeMaximum="no" />
</Upgrade>
<CustomAction Id="RunMainExe" Directory="INSTALLFOLDER" ExeCommand="[INSTALLFOLDER]$(var.Name).exe" Execute="commit" Return="asyncNoWait" />
<InstallExecuteSequence>
<RemoveExistingProducts Before="InstallInitialize" />
<Custom Action="RunMainExe" Before="InstallFinalize" />
</InstallExecuteSequence>
</Package>
<!--Main executable-->
<Fragment>
<ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
<Component Id="MainExe" Guid="2148738D-B1F4-48BD-8615-1617541C6BB3">
<File Id="MainExe" Name="$(var.Name).exe" Source="publish/$(var.Name).exe" />
</Component>
</ComponentGroup>
</Fragment>
<!--Program Menu shortcut-->
<Fragment>
<DirectoryRef Id="ApplicationProgramsFolder">
<Component Id="ApplicationShortcut">
<Shortcut Id="ApplicationStartMenuShortcut" Name="$(var.Name)" Icon="Logo.ico" Target="[#MainExe]" WorkingDirectory="INSTALLFOLDER" />
<RemoveFolder Id="ApplicationProgramsFolder" On="uninstall" />
<RegistryValue Root="HKCU" Key="Software\Microsoft\$(var.Manufacturer)\$(var.Name)" Name="installed" Type="integer" Value="1" KeyPath="yes" />
</Component>
</DirectoryRef>
</Fragment>
</Wix>