Not sure why you are using the MyDirectory variable. As WixVariable docs say:
WiX variables are not saved in the msi / msm / pcp file, so they cannot be used when installing the MSI file; This is the concept of WiX.
Its value is written as text in the place where you use it. So, if you want the value to be replaced at the time of installation, you should use it only in that context.
A typical use of ProgramFilesFolder is the / @ Id directory, which can have a MyFiles directory, such as MyFiles . Note. The / @ Id directory is also a property, so it can be used as such.
<Directory Id="TARGETDIR" Name="SourceDir"> <Directory Id="ProgramFilesFolder"> <Directory Id="INSTALLFOLDER" Name="MyFiles" /> </Directory> </Directory>
INSTALLFOLDER used instead of MyDirectory . You can use whatever you want, but by default from the project template. These are all caps that makes it publicly available. The value of the public property can be passed to the installer sequence from the user interface or using msiexec or other programs such as boot files.
Tom blodget
source share