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
- :
- a double substitution is required
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 18, 2008
06:04 AM
Property recursive substitution
I would like to set a reg key to the value of a property but substitute any properties in that property. e.g.
Set Property REG_VAL="This is the product name [ProductName]"
where ProductName is "MyProduct"
set the reg value to [REG_VAL] and get the ProductName substituted e.g. the reg value becomes "This is the product name MyProduct"
I have tried combinations of {..} and [..] in set property custom actions but the properties inside are not substituted.
I would hate to resort to vbscript to perform the substitution.
Help!
Tony
Set Property REG_VAL="This is the product name [ProductName]"
where ProductName is "MyProduct"
set the reg value to [REG_VAL] and get the ProductName substituted e.g. the reg value becomes "This is the product name MyProduct"
I have tried combinations of {..} and [..] in set property custom actions but the properties inside are not substituted.
I would hate to resort to vbscript to perform the substitution.
Help!
Tony
(4) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 18, 2008
08:38 AM
So you tried creating a CA called REG_VAL and set the text to be:
This is the product name [ProductName]. I didn't use quotes - not sure if that makes a difference.
And then when you tried to set a registry value to REG_VAL, it is putting - This is the product name [ProductName] in the value rather than - This is the product name Product1?
If this is what you are trying to do, I just tested this and it seems to work as expected... I've attached my test ism.
This is the product name [ProductName]. I didn't use quotes - not sure if that makes a difference.
And then when you tried to set a registry value to REG_VAL, it is putting - This is the product name [ProductName] in the value rather than - This is the product name Product1?
If this is what you are trying to do, I just tested this and it seems to work as expected... I've attached my test ism.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 18, 2008
08:39 AM
I should say rather - this does what you want it do do; it performs the substitution.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 19, 2008
10:18 AM
Actually this is to support localisation of settings in a merge module so I have simplified it a little here.
The original string to be substituted is in a Property in the main installer which can be easily loclised via the string table.
I want to substitute the property embedded in the Localisable Property as I set it in the registry value. This setting is actually done inside a merge module but the principal is the same.
I have made the change which shows the error in the attached installer.
The original string to be substituted is in a Property in the main installer which can be easily loclised via the string table.
I want to substitute the property embedded in the Localisable Property as I set it in the registry value. This setting is actually done inside a merge module but the principal is the same.
I have made the change which shows the error in the attached installer.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 23, 2010
01:46 AM
Try creating a SetProperty custom action. It allows you to set the value of a property to another property.