Source

Resharper Spell Checker / ReSpeller.Installer / Setup.wxs

<?xml version="1.0"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
  <?define ProductVersion="2.3.0"?>
  <Product Id="*"
    Name="ReSpeller Free $(var.ProductVersion) for ReSharper $(var.rsver)"
    Language="1033"
    Version="$(var.ProductVersion)"
    UpgradeCode="2857ED7D-CBCA-492C-9FC2-3ED93534DF19"
    Manufacturer="Ethereal Code">
    <Package Description="Spell Checker for ReSharper"
      Comments="Comments"
      InstallerVersion="200"
      Compressed="yes"
      InstallScope="perUser"
      ShortNames="no" 
      AdminImage="no"/>


    <Property Id="PREVIOUSVERSIONSINSTALLED" Secure="yes" />

    <MajorUpgrade AllowDowngrades="no" AllowSameVersionUpgrades="yes" DowngradeErrorMessage="A newer version of this application is already installed."/>

    <Media Id="1" Cabinet="contents.cab" EmbedCab="yes" CompressionLevel="high"/>

    <Icon Id="ProductIcon" SourceFile="icon128.ico"/>
    <Property Id="ARPPRODUCTICON" Value="ProductIcon"/>

    <Property Id="RESHARPERDIR2010" Secure="yes">
      <RegistrySearch Id="RSInstallRegistry2010" Root="HKLM" Key="Software\JetBrains\ReSharper\v$(var.rsver)\vs10.0"
        Name="InstallDir" Type="directory"/>
    </Property>

    <Property Id="RESHARPERDIR2012" Secure="yes">
      <RegistrySearch Id="RSInstallRegistry2012" Root="HKLM" Key="Software\JetBrains\ReSharper\v$(var.rsver)\vs11.0"
        Name="InstallDir" Type="directory"/>
    </Property>
    
    <Property Id="MSIUSEREALADMINDETECTION" Value="1" />

    <Condition Message='ReSharper $(var.rsver) and Visual Studio 2010 or 2012 are required to proceed with the installation.'>
      Installed OR (RESHARPERDIR2010 OR RESHARPERDIR2012)
    </Condition>

    <Directory Id="TARGETDIR" Name="SourceDir">
      <Directory Id="LocalAppDataFolder">
        <Directory Id="D.JetBrains" Name="JetBrains">
          <Directory Id="D.ReSharper" Name="ReSharper">
            <Directory Id="D.ver" Name="v$(var.rsver)" >
              <Directory Id="D.Plugins" Name="Plugins">
                <Directory Id="D.ReSpeller" Name="ReSpeller">
                  <Component Id="C.ReSpellerLib" Guid="A870D545-4730-46ED-892B-0E39FBFF0AC1" Permanent="no">
                    <RegistryKey Action="none" Key="myKeyName" Root="HKCU" >
                      <RegistryValue Type="integer" Value="1" KeyPath="yes" />
                    </RegistryKey>
                    <File Source="$(var.binlib)\ReSpeller.dll" Vital="yes"/>
                    <File Source="$(var.binlib)\NHunspell.dll" Vital="yes"/>
                    <File Source="$(var.binlib)\Hunspellx86.dll" Vital="yes"/>
                    <File Source="$(var.binlib)\Hunspellx64.dll" Vital="yes"/>
                    <File Source="$(var.binlib)\WPFToolkit.dll" Vital="yes"/>
                    <File Source="$(var.binlib)\WPFToolkit.Extended.dll" Vital="yes"/>
                    <RemoveFolder Id="R.ReSpeller" On="uninstall" />
                    <RemoveFolder Id="R.JetBrains" Directory="D.JetBrains" On="uninstall" />
                    <RemoveFolder Id="R.ReSharper" Directory="D.ReSharper" On="uninstall" />
                    <RemoveFolder Id="R.ver" Directory="D.ver" On="uninstall" />
                    <RemoveFolder Id="R.Plugins" Directory="D.Plugins" On="uninstall" />
                  </Component>
                  <Directory Id="D.Dic" Name="dic">
                    <Component Id ="C.ReSpellerDic" Guid="1D8CD928-4DE6-420A-B35C-C9AE51A7139E" Permanent="no">
                      <RegistryKey Action="none" Key="myKeyName" Root="HKCU" >
                        <RegistryValue Type="integer" Value="1" KeyPath="yes" />
                      </RegistryKey>
                      <File Source="$(var.binlib)\dic\en_US.aff" Vital="yes"/>
                      <File Source="$(var.binlib)\dic\en_US.dic" Vital="yes"/>
                      <File Source="$(var.binlib)\dic\en_US_custom.dic" Vital="yes"/>
                      <RemoveFolder Id="R.Dic" Directory="D.Dic" On="uninstall" />
                    </Component>
                  </Directory>
                </Directory>
              </Directory>
            </Directory>
          </Directory>
        </Directory>
      </Directory>
    </Directory>

    <Feature Id="Complete" Title="Everything" Description="Everything" Level="1">
      <ComponentRef Id="C.ReSpellerLib"/>
      <ComponentRef Id="C.ReSpellerDic"/>
    </Feature>
    <UI>
      <UIRef Id="WixUI_Minimal" />
    </UI>
  </Product>
</Wix>