Directory name won't expand a Property value #7998
-
How can I set my subfolder name from a property? When I do the following, I get a folder named "C:\Program Files[EDTRG]" instead of expanding out the property to give me "C\Program Files\MyCompany\MyProduct". <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
<Fragment>
<Property Id="EDTRG" Value="!(bind.property.Manufacturer)\!(bind.property.ProductName)" />
<StandardDirectory Id="ProgramFiles6432Folder">
<Directory Id="INSTALLFOLDER" Name="[EDTRG]" />
</StandardDirectory>
</Fragment>
</Wix> |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
That's correct. The directory table's DefaultDir column isn't of type formatted so it can't interpolate properties. Instead you must used a type51 set property custom action prior to costing or a type 35 set directory custom action after costing to mutate the destination directory. https://learn.microsoft.com/en-us/windows/win32/msi/directory-table |
Beta Was this translation helpful? Give feedback.
That's correct. The directory table's DefaultDir column isn't of type formatted so it can't interpolate properties. Instead you must used a type51 set property custom action prior to costing or a type 35 set directory custom action after costing to mutate the destination directory.
https://learn.microsoft.com/en-us/windows/win32/msi/directory-table