This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: Working with strings...
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 04, 2010
10:11 AM
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?
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?
(2) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 04, 2010
01:35 PM
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.
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.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 05, 2010
08:17 AM
Hi,
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?
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?
![](/skins/images/D60DF682EA37BF37032955CE10F3F0BB/responsive_peak/images/icon_anonymous_message.png)