MSI: referencing Directory table in Property table.
Hello.
I have a Property which sets the location to 32-bit version of IE. I'd like to fetch this location from the ProgramFilesFolder entry in the Directory table.
I would have thought "[ProgramFilesFolder]Internet Explorer\iexplore.exe" would resolve to "C:\Program Files (x86)\Internet Explorer\iexplore.exe", but alas, this is not the case. It resolves to "[ProgramFilesFolder]Internet Explorer\iexplore.exe".
How can reference the Directory table so that my property resolves correctly to "C:\Program Files (x86)".
Answers (5)
This because, the installer does nothing to the text string entered in the Value column before setting the property in the Property column. For Ex: If FirstProperty is entered into the Property column and [SecondProperty] in the Value column, the value of FirstProperty is set to the text string "[SecondProperty]" and not to the value of the SecondProperty property. This is necessary to prevent creating circular references in the Property table. Instead, you can set one property to another by using a Custom Action Type 51
This because, the installer does nothing to the text string entered in the Value column before setting the property in the Property column.
For Ex:
If FirstProperty is entered into the Property column and [SecondProperty] in the Value column, the value of FirstProperty is set to the text string "[SecondProperty]" and not to the value of the SecondProperty property.
This is necessary to prevent creating circular references in the Property table. Instead, you can set one property to another by using a Custom Action Type 51
Comments:
-
That's what I was looking for. Thanks! - Normannen 11 years ago
Are you futzing with IE itself or another application which uses it?
I wouldn't recommend the former and for the latter I'd recommend using AppSearch to find its location and setting a property's value.
Comments:
-
It was more of a general question, set within the context of this particular situation.
It really is just a shortcut launching IE with a given URL. The path to IE is set through a property. AppSearch you say? I thought there would be a simple(r) way of doing it. - Normannen 11 years ago