I tried this using the following code but the subfolder inside the "ProgramData" folder is not created. My requirement is to install some files in install directory provided by user and deploy a few configuration files into "ProgramData", e.g. C:\ProgramData\COMPANYNAME\APPNAME.
Find the code I use below. Can anyone help me to identify the issue? Or another solution to achieve this?
<Fragment>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="INSTALLFOLDER" Name="APPNAME" />
</Directory>
<Directory Id="CommonAppDataFolder">
<Directory Id="CommonAppDataManufacturerFolder" Name="COMPANYNAME">
<Directory Id="MyAppDataFolder" Name="APPNAME">
</Directory>
</Directory>
</Directory>
</Directory>
</Fragment>