chromium/chrome/updater/test/test_installer/test_installer.wxs.xml

<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
  <Product Id='$(var.MsiProductId)'
           Language="1033"
           Codepage='1252'
           Manufacturer='$(var.CompanyFullName)'
           Name="$(var.ProductName)"
           UpgradeCode='$(var.MsiUpgradeCode)'
           Version='$(var.ProductVersion)'>

    <?ifdef PerUserInstall ?>
        <Package InstallScope="perUser" Compressed="yes" />
        <?define HKRoot = 'HKCU'?>
    <?else?>
        <Package InstallScope="perMachine" Compressed="yes" />
        <?define HKRoot = 'HKLM'?>
    <?endif?>

    <MajorUpgrade DowngradeErrorMessage="A later version of [ProductName] is already installed. Setup will now exit." />

    <Directory Id='TARGETDIR' Name='SourceDir'>
      <!-- Use the ProductCode as the ComponentId since we want the latter to
           change for each version change in support of major upgrades. -->
      <Component Id='ProductClients' Guid='$(var.MsiProductId)' Win64='no'>
        <Condition>
            <![CDATA[NOT INSTALLER_RESULT OR (INSTALLER_RESULT = 0) OR (INSTALLER_ERROR = 3010)]]>
        </Condition>
        <RegistryKey Root='$(var.HKRoot)' Key='SOFTWARE\$(var.CompanyName)\Update\Clients\$(var.ProductGuid)'>
          <RegistryValue KeyPath='yes' Type='string' Name='pv' Value='$(var.ProductVersion)' />
        </RegistryKey>
      </Component>
      <Component Id='InstallerResultSet' Guid='$(var.ComponentGuidInstallerResultSet)'>
        <Condition>INSTALLER_RESULT</Condition>
        <RegistryValue Root='$(var.HKRoot)'
          Key='Software\$(var.CompanyName)\Update\ClientState\$(var.ProductGuid)'
          Name='InstallerResult' Value='[INSTALLER_RESULT]'
          Action='write' Type='integer' />
      </Component>
      <Component Id='InstallerErrorSet' Guid='$(var.ComponentGuidInstallerErrorSet)'>
        <Condition>INSTALLER_ERROR</Condition>
        <RegistryValue Root='$(var.HKRoot)'
          Key='Software\$(var.CompanyName)\Update\ClientState\$(var.ProductGuid)'
          Name='InstallerError' Value='[INSTALLER_ERROR]'
          Action='write' Type='integer' />
      </Component>
      <Component Id='InstallerResultUIStringSet' Guid='$(var.ComponentGuidInstallerResultUIStringSet)'>
        <Condition>INSTALLER_RESULT_UI_STRING</Condition>
        <RegistryValue Root='$(var.HKRoot)'
          Key='Software\$(var.CompanyName)\Update\ClientState\$(var.ProductGuid)'
          Name='InstallerResultUIString' Value='[INSTALLER_RESULT_UI_STRING]'
          Action='write' Type='string' />
      </Component>
      <Component Id='RegisterLaunchCommandSet'
                 Guid='$(var.ComponentGuidRegisterLaunchCommandSet)'>
        <Condition>REGISTER_LAUNCH_COMMAND</Condition>
        <RegistryValue Root='$(var.HKRoot)'
          Key='Software\$(var.CompanyName)\Update\ClientState\$(var.ProductGuid)'
          Name='InstallerSuccessLaunchCmdLine' Value='[REGISTER_LAUNCH_COMMAND]'
          Action='write' Type='string' />
      </Component>
    </Directory>

    <Feature Id='Complete' Level='1'>
      <ComponentRef Id='ProductClients' />
      <ComponentRef Id='InstallerResultSet' />
      <ComponentRef Id='InstallerErrorSet' />
      <ComponentRef Id='InstallerResultUIStringSet' />
      <ComponentRef Id='RegisterLaunchCommandSet' />
    </Feature>

  </Product>
</Wix>