<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->


<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
    <Fragment>
        <Property Id="VS2013_EXTENSIONS_DIR" Secure="yes">
            <RegistrySearch Id="VS2013DevEnvForExtensionsSearch" Root="HKLM" Key="SOFTWARE\Microsoft\VisualStudio\12.0\Setup\VS" Name="EnvironmentDirectory" Type="raw">
                <DirectorySearch Id="VS2013ExtensionsPathSearch" Path="Extensions" Depth="1" />
            </RegistrySearch>
        </Property>
    </Fragment>

    <Fragment>
        <Property Id="VS2013_PROJECTTEMPLATES_DIR" Secure="yes">
            <RegistrySearch Id="VS2013DevEnvForProjectTemplatesSearch" Root="HKLM" Key="SOFTWARE\Microsoft\VisualStudio\12.0\Setup\VS" Name="EnvironmentDirectory" Type="raw">
                <DirectorySearch Id="VS2013ProjectTemplatesPathSearch" Path="ProjectTemplates" Depth="1" />
            </RegistrySearch>
        </Property>
    </Fragment>

    <Fragment>
        <Property Id="VS2013_SCHEMAS_DIR" Secure="yes">
            <RegistrySearch Id="VS2013ProductPathSearch" Root="HKLM" Key="Software\Microsoft\VisualStudio\SxS\VS7" Name="12.0" Type="raw">
                <DirectorySearch Id="VS2013XmlPathSearch" Path="Xml" Depth="1">
                    <DirectorySearch Id="VS2013XmlSchemasPathSearch" Path="Schemas" Depth="1" />
                </DirectorySearch>
            </RegistrySearch>
        </Property>
    </Fragment>

    <Fragment>
        <Property Id="VS2013_ITEMTEMPLATES_DIR" Secure="yes">
            <RegistrySearch Id="VS2013DevEnvForItemTemplatesSearch" Root="HKLM" Key="SOFTWARE\Microsoft\VisualStudio\12.0\Setup\VS" Name="EnvironmentDirectory" Type="raw">
                <DirectorySearch Id="VS2013ItemTemplatesPathSearch" Path="ItemTemplates" Depth="1" />
            </RegistrySearch>
        </Property>
    </Fragment>

    <Fragment>
        <Property Id="VS2013_BOOTSTRAPPER_PACKAGE_FOLDER" Secure="yes">
            <RegistrySearch Id="SearchForVS2013BootstrapperPackageFolder" Root="HKLM" Key="Software\Microsoft\GenericBootstrapper\12.0" Name="Path" Type="raw" />
        </Property>
    </Fragment>

    <Fragment>
        <Property Id="VS2013_ROOT_FOLDER" Secure="yes">
            <RegistrySearch Id="SearchForVS2013RootPath" Root="HKLM" Key="Software\Microsoft\VisualStudio\SxS\VS7" Name="12.0" Type="raw" />
        </Property>
    </Fragment>

    <Fragment>
        <Property Id="VS2013DEVENV" Secure="yes">
            <RegistrySearch Id="VS2013DevEnvSearch" Root="HKLM" Key="SOFTWARE\Microsoft\VisualStudio\12.0\Setup\VS" Name="EnvironmentPath" Type="raw" />
        </Property>
    </Fragment>

    <Fragment>
        <CustomAction Id="VS2013Setup" Property="VS2013DEVENV" ExeCommand="/setup" Execute="deferred" Return="ignore" Impersonate="no" />
        <PropertyRef Id="VS2013DEVENV" />

        <InstallExecuteSequence>
            <Custom Action="VS2013Setup" Before="InstallFinalize" Overridable="yes">VS2013DEVENV</Custom>
        </InstallExecuteSequence>
    </Fragment>

    <Fragment>
        <CustomAction Id="VS2013InstallVSTemplates" Property="VS2013DEVENV" ExeCommand="/InstallVSTemplates" Execute="deferred" Return="ignore" Impersonate="no" />
        <PropertyRef Id="VS2013DEVENV" />

        <InstallExecuteSequence>
            <Custom Action="VS2013InstallVSTemplates" Before="InstallFinalize" Overridable="yes">VS2013DEVENV</Custom>
        </InstallExecuteSequence>
    </Fragment>

    <!-- Indicates whether the Visual C# project system is installed as a part of  -->
    <!-- Visual Studio 2013 Pro or higher. If this property is set, that           -->
    <!-- means Visual Studio 2013 Pro or higher is installed and the Visual        -->
    <!-- C# language tools were installed as a part of VS 2013 setup.              -->
    <Fragment>
        <Property Id="VS2013_IDE_VCSHARP_PROJECTSYSTEM_INSTALLED" Secure="yes">
            <RegistrySearch Id="SearchForVCS2013ProjectSystemUnderVSSetup" Root="HKLM" Key="SOFTWARE\Microsoft\VisualStudio\12.0\Setup\VC#" Name="ProductDir" Type="raw" />
        </Property>
    </Fragment>

    <!-- Indicates whether the Visual Basic project system is installed as a part of -->
    <!-- Visual Studio 2013 Pro or higher. If this property is set, that             -->
    <!-- means Visual Studio 2013 Pro or higher is installed and the Visual          -->
    <!-- Basic language tools were installed as a part of VS 2013 setup.             -->
    <Fragment>
        <Property Id="VS2013_IDE_VB_PROJECTSYSTEM_INSTALLED" Secure="yes">
            <RegistrySearch Id="SearchForVB2013ProjectSystemUnderVSSetup" Root="HKLM" Key="SOFTWARE\Microsoft\VisualStudio\12.0\Setup\VB" Name="ProductDir" Type="raw" />
        </Property>
    </Fragment>

    <!-- Indicates whether the Visual Web Developer 2013 Express IDE component is installed.  -->
    <!-- If this property is set, that means Visual Web Developer 2013 Express Edition is     -->
    <!-- installed on the system.                                                             -->
    <Fragment>
        <Property Id="VWD2013EXPRESS_IDE" Secure="yes">
            <ComponentSearch Id="SearchForVwdExpressIde2013Component" Guid="{04B98358-C73B-40F7-9946-AA80B316DA84}" Type="file">
                <FileSearch Id="VwdExpressIde2013" Name="vwdexpress.exe" />
            </ComponentSearch>
        </Property>
    </Fragment>
    <!-- Custom action definition to run vwdexpress.exe /setup                               -->
    <Fragment>
        <CustomAction Id="VWD2013Setup" Property="VWD2013EXPRESS_IDE" ExeCommand="/setup" Execute="deferred" Return="ignore" Impersonate="no" />
        <PropertyRef Id="VWD2013EXPRESS_IDE" />
        <InstallExecuteSequence>
            <Custom Action="VWD2013Setup" Before="InstallFinalize" Overridable="yes">VWD2013EXPRESS_IDE</Custom>
        </InstallExecuteSequence>
    </Fragment>
    <!-- Custom action definition to run vwdexpress.exe /InstallVSTemplates                  -->
    <Fragment>
        <CustomAction Id="VWD2013InstallVSTemplates" Property="VWD2013EXPRESS_IDE" ExeCommand="/InstallVSTemplates" Execute="deferred" Return="ignore" Impersonate="no" />
        <PropertyRef Id="VWD2013EXPRESS_IDE" />
        <InstallExecuteSequence>
            <Custom Action="VWD2013InstallVSTemplates" Before="InstallFinalize" Overridable="yes">VWD2013EXPRESS_IDE</Custom>
        </InstallExecuteSequence>
    </Fragment>

    <!-- Indicates whether the Visual Studio 2013 Express IDE for Phone component is installed.  -->
    <Fragment>
        <Property Id="VPD2013EXPRESS_IDE" Secure="yes">
            <RegistrySearch Id="VPD2013ExpressForPhoneEnvSearch" Root="HKLM" Key="SOFTWARE\Microsoft\VPDExpress\12.0\Setup\VS" Name="EnvironmentPath" Type="raw" />
        </Property>
    </Fragment>
    <!-- Custom action definition to run VPDexpress.exe /setup                               -->
    <Fragment>
        <CustomAction Id="VPD2013Setup" Property="VPD2013EXPRESS_IDE" ExeCommand="/setup" Execute="deferred" Return="ignore" Impersonate="no" />
        <PropertyRef Id="VPD2013EXPRESS_IDE" />
        <InstallExecuteSequence>
            <Custom Action="VPD2013Setup" Before="InstallFinalize" Overridable="yes">VPD2013EXPRESS_IDE</Custom>
        </InstallExecuteSequence>
    </Fragment>
    <!-- Custom action definition to run VPDexpress.exe /InstallVSTemplates                  -->
    <Fragment>
        <CustomAction Id="VPD2013InstallVSTemplates" Property="VPD2013EXPRESS_IDE" ExeCommand="/InstallVSTemplates" Execute="deferred" Return="ignore" Impersonate="no" />
        <PropertyRef Id="VPD2013EXPRESS_IDE" />
        <InstallExecuteSequence>
            <Custom Action="VPD2013InstallVSTemplates" Before="InstallFinalize" Overridable="yes">VPD2013EXPRESS_IDE</Custom>
        </InstallExecuteSequence>
    </Fragment>

    <!-- Indicates whether the Visual Web Developer project system is installed as a part of -->
    <!-- Visual Studio 2013 Pro or higher. If this property is set, that                     -->
    <!-- means Visual Studio 2013 Pro or higher is installed and the Visual                  -->
    <!-- Web Developer language tools were installed as a part of VS 2013 setup.             -->
    <Fragment>
        <Property Id="VS2013_IDE_VWD_PROJECTSYSTEM_INSTALLED" Secure="yes">
            <ComponentSearch Id="SearchForVWD2013ProjectSystemUnderVSSetup" Guid="{CDA2DE5A-F6F4-48D0-B9BA-58CFD381143C}" />
            <ComponentSearch Id="SearchForVWD2013ProjectSystemUnderVWDSetup" Guid="{C6E8D1B3-85F3-4F3A-A6AE-4166F917C9FD}" Type="directory" />
        </Property>
    </Fragment>

    <!-- Indicates whether the Visual C++ project system is installed as a part of -->
    <!-- Visual Studio 2013 Pro or higher. If this property is set, that           -->
    <!-- means Visual Studio 2013 Pro or higher is installed and the Visual        -->
    <!-- C++ language tools were installed as a part of VS 2013 setup.             -->
    <Fragment>
        <Property Id="VS2013_IDE_VC_PROJECTSYSTEM_INSTALLED" Secure="yes">
            <RegistrySearch Id="SearchForVC2013ProjectSystemUnderVSSetup" Root="HKLM" Key="SOFTWARE\Microsoft\VisualStudio\12.0\Setup\VC" Name="ProductDir" Type="raw" />
        </Property>
    </Fragment>

    <!-- Indicates whether the Visual Studio 2013 Team Test project system is installed -->
    <Fragment>
        <Property Id="VS2013_IDE_VSTS_TESTSYSTEM_INSTALLED" Secure="yes">
            <RegistrySearch Id="SearchForVSTS2013TestSystemUnderVSSetup" Root="HKLM" Key="SOFTWARE\Microsoft\VisualStudio\12.0\Projects\{3AC096D0-A1C2-E12C-1390-A8335801FDAB}" Name="Package" Type="raw" />
        </Property>
    </Fragment>

    <!-- Indicates whether the Windows Installer XML project system is installed for VS2013 -->
    <Fragment>
        <Property Id="VS2013_IDE_WIX_PROJECTSYSTEM_INSTALLED" Secure="yes">
            <!-- Component search for the .pkgdef file for VS2013 -->
            <ComponentSearch Id="SearchForVS2013WixSystemUnderVSSetup" Guid="{768F32E1-BAAB-5203-822D-3BD85F9BD26E}" />
        </Property>
    </Fragment>

    <!-- Indicates whether the Visual Studio Modeling project system is installed -->
    <Fragment>
        <Property Id="VS2013_IDE_MODELING_PROJECTSYSTEM_INSTALLED" Secure="yes">
            <RegistrySearch Id="SearchForVSTS2013ModelingSystemUnderVSSetup" Root="HKLM" Key="SOFTWARE\Microsoft\VisualStudio\12.0\Projects\{f088123c-0e9e-452a-89e6-6ba2f21d5cac}" Name="Package" Type="raw" />
        </Property>
    </Fragment>

    <!-- Indicates whether the Visual Studio F# project system is installed -->
    <Fragment>
        <Property Id="VS2013_IDE_FSHARP_PROJECTSYSTEM_INSTALLED" Secure="yes">
            <RegistrySearch Id="SearchForVSTS2013FSharpSystemUnderVSSetup" Root="HKLM" Key="SOFTWARE\Microsoft\VisualStudio\12.0\Setup\F#" Name="ProductDir" Type="raw" />
        </Property>
    </Fragment>

    <!-- Indicates whether the Visual Studio Express for Windows IDE component is installed. -->
    <!-- If this property is set, that means Visual Studio Express for Windows is installed  -->
    <!-- on the system.                                                                      -->
    <Fragment>
        <Property Id="VS2013WINEXPRESS_IDE" Secure="yes">
            <ComponentSearch Id="SearchForVS2013WinExpressIdeComponent" Guid="{5E7D5287-3ADA-4A8E-9953-C6B702BD1F01}" Type="file">
                <FileSearch Id="VS2013WinExpressIde" Name="vswinexpress.exe" />
            </ComponentSearch>
        </Property>
    </Fragment>

    <!-- Custom action definition to run vswinexpress.exe /setup                             -->
    <Fragment>
        <CustomAction Id="VS2013WinExpressSetup" Property="VS2013WINEXPRESS_IDE" ExeCommand="/setup" Execute="deferred" Return="ignore" Impersonate="no" />
        <PropertyRef Id="VS2013WINEXPRESS_IDE" />
        <InstallExecuteSequence>
            <Custom Action="VS2013WinExpressSetup" Before="InstallFinalize" Overridable="yes">VS2013WINEXPRESS_IDE</Custom>
        </InstallExecuteSequence>
    </Fragment>
    
    <!-- Custom action definition to run vswinexpress.exe /InstallVSTemplates                -->
    <Fragment>
        <CustomAction Id="VS2013WinExpressInstallVSTemplates" Property="VS2013WINEXPRESS_IDE" ExeCommand="/InstallVSTemplates" Execute="deferred" Return="ignore" Impersonate="no" />
        <PropertyRef Id="VS2013WINEXPRESS_IDE" />
        <InstallExecuteSequence>
            <Custom Action="VS2013WinExpressInstallVSTemplates" Before="InstallFinalize" Overridable="yes">VS2013WINEXPRESS_IDE</Custom>
        </InstallExecuteSequence>
    </Fragment>

    <!-- Indicates whether the Visual Studio Express for Windows Desktop IDE component is installed. -->
    <!-- If this property is set, that means Visual Studio Express for Windows Desktop is installed  -->
    <!-- on the system.                                                                              -->
    <Fragment>
        <Property Id="VS2013WDEXPRESS_IDE" Secure="yes">
            <ComponentSearch Id="SearchForVS2013WDExpressIdeComponent" Guid="{6C65247B-900C-45AD-8ED8-3F20E668348E}" Type="file">
                <FileSearch Id="VS2013WDExpressIde" Name="WDExpress.exe" />
            </ComponentSearch>
        </Property>
    </Fragment>

    <!-- Custom action definition to run WDExpress.exe /setup -->
    <Fragment>
        <CustomAction Id="VS2013WDExpressSetup" Property="VS2013WDEXPRESS_IDE" ExeCommand="/setup" Execute="deferred" Return="ignore" Impersonate="no" />
        <PropertyRef Id="VS2013WDEXPRESS_IDE" />
        <InstallExecuteSequence>
            <Custom Action="VS2013WDExpressSetup" Before="InstallFinalize" Overridable="yes">VS2013WDEXPRESS_IDE</Custom>
        </InstallExecuteSequence>
    </Fragment>

    <!-- Custom action definition to run WDExpress.exe /InstallVSTemplates -->
    <Fragment>
        <CustomAction Id="VS2013WDExpressInstallVSTemplates" Property="VS2013WDEXPRESS_IDE" ExeCommand="/InstallVSTemplates" Execute="deferred" Return="ignore" Impersonate="no" />
        <PropertyRef Id="VS2013WDEXPRESS_IDE" />
        <InstallExecuteSequence>
            <Custom Action="VS2013WDExpressInstallVSTemplates" Before="InstallFinalize" Overridable="yes">VS2013WDEXPRESS_IDE</Custom>
        </InstallExecuteSequence>
    </Fragment>
</Wix>
