randallxski
Posts: 9
Joined: Mon Jun 13, 2011 2:25 pm

Referencing Property Values in Shortcut Name

I'm using an INI file in the install source folder that I reference using [SourceDir] to populate some properties using Custom Search. The results from the Test Search are always blank (does this ever work?). The properties are referenced successfully to specify the target installation folder (the "application folder" in Install Parameters). I'm trying to use properties in a desktop shortcut name, but they are ignored. Is there something special I need to do to reference a property in a program shortcut?

When naming the shortcut, I'm using the file properties and Select a Property dialog to insert the property reference, so the property reference in the name looks like [|RESULT_PROPERTY]. Taking the extra "|" out leaves me with "[RESULT_PROPERTY]" in the shortcut name. Any suggestions on how to get this to work?
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Referencing Property Values in Shortcut Name

Hello and welcome to the Advanced Installer Forums,

Unfortunately, the shortcut name field is pseudo-formatted type which means that the value of the referenced property will be resolved at build time. Here is the user guide reference. However, you can try to install the shortcut from within your own custom action.
The results from the Test Search are always blank (does this ever work?).
The test returns the value of the search if it is found, otherwise it will remain blank. The structure of the return string depends on the search type. Here are more related informations.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
randallxski
Posts: 9
Joined: Mon Jun 13, 2011 2:25 pm

Re: Referencing Property Values in Shortcut Name

Thanks for the note and the welcome, Mihai. Resolving the value at build time is fine, but right now it's not being resolved at all. If the values are being pulled from an INI file included in the build, and the referenced values are already included in the INI file, and a pseudo-formatted type is resolved at build time, then shouldn't I be seeing the value that's set in the INI file?

Another thought: If an INI file can't be read and properties populated at build time, is there another type of file or setting that can be included with the install source files but read and resolved during the install? This would be useful if I could customize the name in the Add/Remove Programs list as well.
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Referencing Property Values in Shortcut Name

Hi,

I'm afraid that installer properties cannot be set from an INI at build time. All pseudo-formatted references are resolved to their default values set in the project. If you want to dynamically set installer properties at build, you can try using the command line interface in a build script. What you need cannot be done from the Advanced Installer GUI.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”