cmnunis
cmnunis

Reputation: 71

Is there a way to redirect INSTALLDIR to another directory?

is there a way to point the INSTALLDIR to another folder instead of C:\Program Files?

I have created a WIX installer for our MS-Outlook Add-In and I would like to have the VSTO installed in C:\ProgramData\MyCompany\MyCompanySoftwareProduct.

Is there a way to do this? I am currently using a WIXUI Installer and it defaults to C:\Program Files.

Thank you very much in advance.

Upvotes: 1

Views: 78

Answers (1)

Marlos
Marlos

Reputation: 1965

Yes, use the following:

<Product ...>
    <Property Id="WIXUI_INSTALLDIR" Value="INSTALLFOLDER" />
</Product>

<Fragment>
    <Directory Id="TARGETDIR" Name="SourceDir">
        <Directory Id="CommonAppDataFolder">
            <Directory Id="YourCompanyFolder" Name="YourCompany">
                <!-- other nested directories -->
            </Directory>
        </Directory>
    </Directory>
</Fragment>

Upvotes: 1

Related Questions