Setting a Destination Folder for the Component’s Files
Project:This information applies to the following project types:
Each component can have a different destination location for its files. The default value for the Destination setting is as follows:
|
•
|
For Basic MSI, DIM, InstallScript MSI, Merge Module, MSI Database, and MSM Database, and Transform projects—INSTALLDIR, initialized to [ProgramFilesFolder]Company Name\Product Name in the product’s INSTALLDIR property |
|
•
|
For InstallScript and InstallScript Object projects—TARGETDIR, initialized by default to PROGRAMFILES ^ IFX_COMPANY_NAME ^ IFX_PRODUCT_NAME in the default script code for the OnFirstUIBefore event handler function |
Windows Logo Guideline:According to Windows logo requirements, the default destination of your application’s files must be a subfolder of the end user’s Program Files folder. If you use INSTALLDIR or ProgramFilesFolder as the parent folder for your feature’s Destination setting, your files will be installed to the correct location.
To change the component’s destination folder:
|
1.
|
In the View List under Organization, click Setup Design (installation projects only) or Components. |
|
2.
|
Select the component whose destination you want to change. |
|
3.
|
In the Destination setting, select one of the options from the list, or click the ellipsis button (...) to select or create a directory. |
Other Destination Folder Considerations
Project:These considerations apply to the following project types:
Component’s Remote Installation Setting
Setting the component’s Remote Installation setting to Favor Source (or to Optional when the component’s feature is set to Favor Source) means that the component’s files will not be installed on the target system, regardless of the component’s Destination setting.
Feature’s Remote Installation Setting
Each feature also has a Destination setting. If different, the component’s Destination setting overrides the feature’s destination. The feature’s Destination setting is optional, but the component’s is required.
INSTALLDIR as Default Destination
The assumption behind using INSTALLDIR as the default Destination setting for all of your features and components is that you want all of your application’s files installed to the same root folder. This way, when an end user changes the destination folder for any of the features in the CustomSetup dialog, the destination folders for all of the features that are set to be installed to the path contained in INSTALLDIR also change.
Note:If the component’s destination is set to something other than INSTALLDIR, the components are installed to the destination specified for each component and changing INSTALLDIR has no effect on the components’ destinations.
An installer folder property such as INSTALLDIR specifies a default value. An end user can change this value by setting a property when launching Msiexec.exe at the command line or by selecting a new destination folder for a feature in the CustomSetup dialog.
[GlobalAssemblyCache] for Components Containing a .NET Assembly
If a component contains a .NET assembly, you can set the component’s destination to [GlobalAssemblyCache]. When a .NET assembly is installed to a target system’s Global Assembly Cache (GAC), the assembly can be accessed by other applications on the system.
In general, it is preferable to install assemblies to the local application directory. This increases application isolation.
Note:To install an assembly to the Global Assembly Cache, the .NET Scan at Build setting for the assembly’s component must be set to either Properties Only or Dependencies and Properties.