Using properties for the Shortcut Folder - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

brianhudson
Posts: 7
Joined: Tue Jul 28, 2009 9:59 pm

Using properties for the Shortcut Folder

In the "Files and Folders" view I created a new folder in the "StartMenu\Programs" folder to contain shortcuts.

"ProgramMenuFolder\CarlX"

I would like to use properties for the folder name since the user is allowed to install in either a "production" or "Test" folder. When I use the context menu to create a shortcut from the filename I do not have the option to choose a property as the shortcut path.

Ideally I want the Shortcut Folder to be:

ProgramMenuFolder\[Product Name]\[PROD_TEST]

or

ProgramMenuFolder\CarlX\[PROD_TEST]

Thanks,
Brian
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Using properties for the Shortcut Folder

Hi,

You have two options for what you want to do:

Option 1:
- go to Files and Folders page and create the New Folder → Regular.
- now go to Custom Actions page and after CostFinalize add a “Directory Set with Formatted” custom action. To show CostFinalize phase right click Install → Show Standard Actions → Before Initialization → CostFinalize.

This custom action allows you to set the installation path of the folder you select when adding the custom action. For example you can set the Formatted Text field to:

Code: Select all

 [ProgramMenuFolder] 
this will set the path to the Start Menu → Programs folder from the Files and Folders page.

Option 2:
For this you can use a property based folder. First go to Install Parameters page and create a new property within the Properties group.

Now go to Custom Actions page and add a “Property Set with Formatted” custom action after the Begin phase. This custom action will allow you to set the property from Install Parameters page with the path you desire for your new folder.

Now go to Files and Folders page, right click on Programs folder → New Folder → Property Based and select the property you've created. A new folder will be added on the end of the folders list from the page. Right click the folder → New Shortcut.

This way your shortcut will be created in the path specified by the custom action.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”