<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
  <Product
    Id="*"
    Name="Farm Control Server"
    Language="1033"
    Version="$(var.Version)"
    Manufacturer="Tom Butcher"
    UpgradeCode="A4E29F1C-8B3D-5E2A-9C71-1D6F8E4A2B90"
  >
    <Package
      InstallerVersion="200"
      Compressed="yes"
      InstallScope="perMachine"
      Description="Farm Control Server"
    />
    <MajorUpgrade DowngradeErrorMessage="A newer version of Farm Control Server is already installed." />
    <Media Id="1" Cabinet="media1.cab" EmbedCab="yes" />

    <Directory Id="TARGETDIR" Name="SourceDir">
      <Directory Id="ProgramFiles64Folder">
        <Directory Id="INSTALLFOLDER" Name="Farm Control Server" />
      </Directory>
    </Directory>

    <DirectoryRef Id="INSTALLFOLDER">
      <Component Id="SetupComponent" Guid="*">
        <File Id="SetupExe" Source="$(var.SetupExe)" KeyPath="yes" />
      </Component>
    </DirectoryRef>

    <Feature Id="MainFeature" Title="Farm Control Server" Level="1">
      <ComponentRef Id="SetupComponent" />
    </Feature>

    <CustomAction
      Id="RunSetup"
      FileKey="SetupExe"
      ExeCommand="/S"
      Execute="deferred"
      Impersonate="no"
      Return="check"
    />
    <InstallExecuteSequence>
      <Custom Action="RunSetup" After="InstallFiles">NOT Installed</Custom>
    </InstallExecuteSequence>
  </Product>
</Wix>
