Showing results for 
Show  only  | Search instead for 
Did you mean: 
Level 4

Working with strings...

I am trying to figure out how to concatenate strings defined and use them in InstallShield properties. It seems the only documentation on using string is using them in scripting. In my product shortcut and name I would like to include the version number. Of course the version number is a string already but I cannot find a way to use the string to form the product name or the shortcut name. As it is I have had to hardcode the version number in the IS settings (not the script but the fields that allow you to specify product names).

In my shortcut, how do I say "My Product - " PRODUCT_VERSION? I don't want to hardcode it because I have to search through everything every time I build and create a new version. What if I miss one of my many hardcoded version strings? Do you see the need to be able to reference strings in PathVariables and each user field in InstallSheild itself?

Is there a way to do this?
Labels (1)
0 Kudos
(2) Replies
Level 3

I have a solution for you. The solution works in a BasicMSI install type project. Are you using that project type?

The details of the solution follow:

A new custom action that sets a property to be used by a deferred execution Installscript custom action that renames the shortcut file to the property value you set in the 1st custom action. The shortcut is just a filename with a .lnk extension so if you rename that file from "MyShortcut.lnk" to "ABC123.lnk", it renames the shortcut desc to "ABC123".

If this will work for you, I'll post some screen shots.
0 Kudos
Level 4


That might work except that is only one area that I need to use concatenated strings for. What I really need it for is so that I only have to enter a version number in 1 single place and be able to use that version number in several different places in InstallShield. As it is you have hard code it in several areas to get it to be the same and every time I update it I must go to about 5 different areas to change the hardcoded version number. This could lead to problems. If I can use a string in a Path Variable then I can create several Path Variables that do the job but I don't know how to use a string in a Path Variable. Do you (or anyone else) know how to concatenate a Path Variable from a string? If not from a string can you at least concatenate a Path Variable from another Path Variable?
0 Kudos