i tried with following code, But ProgramData folder is not getting created while installing. My requirement is to install some files in install directory provided by user and deploy few configuration files in ProgramData folder(C:\ProgramData\COMPANYNAME\APPNAME). Code is given 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>
You need a feature containing a component installing into the MyAppDataFolder directory for the installer to implicitly create the folder during installation. With no component installing there the folder won't be created.
Just defining a Directory structure is not good enough to get those folders to be created.
It's not required to copy files into the folder to create the folder. You just need specify the element.
For instance..
<Fragment>
<Component Id="FolderComponent" Directory="BackupFolder" Guid="GUID" Win64="yes">
<CreateFolder />
</Component>
</Fragment>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With