cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
swalkertdci
Level 2

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
Labels (1)
0 Kudos
(1) Reply
Cary_R
Level 11

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.
0 Kudos