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
- :
- Installscript: How To Substitue MSI Properties Into String?
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
Jan 08, 2010
09:56 AM
Installscript: How To Substitue MSI Properties Into String?
I've got a basic MSI project with an installscript custom action. In that action I am reading some data from the MSI tables into a string variable. The variable has the value "[SourceDir]Blah.msi"
How do I from installscript perform the substitution of [SourceDir] with the corresponding MSI property in this string? I tried TextSubSubstitute and that did not work.
I feel like there has to be an easy way to do this and I'm just missing it.
Thanks
How do I from installscript perform the substitution of [SourceDir] with the corresponding MSI property in this string? I tried TextSubSubstitute and that did not work.
I feel like there has to be an easy way to do this and I'm just missing it.
Thanks
(1) Reply
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Jan 08, 2010
11:08 AM
Hi There,
MSI has an API call for this:
MsiFormatRecord
http://msdn.microsoft.com/en-us/library/aa370109(VS.85).aspx?ppud=4
However, you could also roll your own function that uses MsiGetProperty and then substitutes the property value from its name in brackets.
MSI has an API call for this:
MsiFormatRecord
http://msdn.microsoft.com/en-us/library/aa370109(VS.85).aspx?ppud=4
However, you could also roll your own function that uses MsiGetProperty and then substitutes the property value from its name in brackets.
![](/skins/images/089A6DFE1F4989CB8CCC689A38D62C96/responsive_peak/images/icon_anonymous_message.png)