<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
  <Product
    Id="__PRODUCT_ID__"
    Name="Farm Control Server"
    Language="1033"
    Version="__VERSION__"
    Manufacturer="Tom Butcher"
    UpgradeCode="__UPGRADE_CODE__">
    <Package
      InstallerVersion="500"
      Compressed="yes"
      InstallScope="perMachine"
      Platform="x64" />

    <Condition Message="Windows 7 and above is required"><![CDATA[Installed OR VersionNT >= 601]]></Condition>

    <MajorUpgrade
      AllowSameVersionUpgrades="yes"
      DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
    <MediaTemplate EmbedCab="yes" CompressionLevel="high" />

    <Property Id="DISABLEADVTSHORTCUTS" Value="1" />
    <Property Id="MSIINSTALLPERUSER" Value="1" />

    <Binary Id="WrappedExe" SourceFile="__SETUP_EXE__" />

    <CustomAction
      Id="RunInstaller"
      BinaryKey="WrappedExe"
      ExeCommand="/S"
      Execute="deferred"
      Impersonate="no"
      Return="check" />

    <Directory Id="TARGETDIR" Name="SourceDir">
      <Directory Id="TempFolder" Name="Temp">
        <Component Id="EmptyComponent" Guid="7145262D-7149-4F1A-9A69-F377E38F04DA">
          <CreateFolder />
        </Component>
      </Directory>
    </Directory>

    <Feature Id="EmptyFeature" Level="0">
      <ComponentRef Id="EmptyComponent" />
    </Feature>

    <InstallExecuteSequence>
      <Custom Action="RunInstaller" After="ProcessComponents">NOT Installed</Custom>
    </InstallExecuteSequence>
  </Product>
</Wix>
