- Revenera Community
- :
- InstallShield
- :
- InstallShield Knowledge Base
- :
- Creating a Custom Destination Path
- Mark as New
- Mark as Read
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
Creating a Custom Destination Path
Creating a Custom Destination Path
Summary
Create a Custom Destination PathSynopsis
This article applies to InstallScript projects and explains how to create a custom destination path using script-defined folders or public properties.
Discussion
DevStudio 9.x and later users
InstallScript MSI Projects
Follow these steps to create a custom destination path using public properties:
- Open the Components view, under Organization.
- Select a component to create a custom destination path.
- In the Components property window, select the value for the component?s Destination property.
- Click the drop down and select "Browse, create, or modify a directory entry?"
- In the Browse for Directory window, select the Destination Computer.
- Click the Insert (Ins) key and name the folder, for example My Directory.
- Set the Directory Identifier to a public property (all capitol letters), for example MY_CUSTOM_PATH.
- Make sure to select the new folder My Directory and then click OK.
To define the location of the public property, in the OnFirstUIBefore event handler function, after the begin statement, call the function FeatureSetTarget. For example:
FeatureSetTarget ( MEDIA , "MY_CUSTOM_PATH" , TARGETDISK ^ "customfolder" );The third parameter of this function should be the custom destination path.
InstallScript Projects
Follow these steps to create a custom destination path using script-defined folder:
- Open the Components view, under Organization.
- Select a component to create a custom destination path (script-defined folder).
- In the Components property window, select the value for the component?s Destination property.
- Click the drop down and select "Browse, create, or modify a directory entry?"
- In the Browse for Directory window, select Script-defined Folders.
- Click the Insert (Ins) key and name the folder, for example <MY_CUSTOM_PATH>.
- Make sure to select the new script-defined folder <MY_CUSTOM_PATH> and then click OK.
To define the location of the script-defined folder, in the OnFirstUIBefore event handler function, after the begin statement, call the function FeatureSetTarget. For example:
FeatureSetTarget ( MEDIA , "<MY_CUSTOM_PATH>" , TARGETDISK ^ "customfolder" );
The third parameter of this function should be the custom destination path.
Professional 7.x and 6.x users
Follow these steps to create a custom destination path using script-defined folder:
- Open the project workspace?s File Groups pane.
- Select a file group to create a custom destination path (script-defined folder).
- In the File Groups property and value window, double-click the file group?s Destination property.
- In the Destination Properties window, select Script-defined Folders.
- Click the New Folder button and name the folder, for example <MY_CUSTOM_PATH>, then click OK.
To define the location of the script-defined folder, in the OnFirstUIBefore event handler function, after the begin statement, call the function ComponentSetTarget. For example:
ComponentSetTarget ( MEDIA , "<MY_CUSTOM_PATH>" , TARGETDISK ^ "customfolder" );
The third parameter of this function should be the custom destination path.