The data to be stored in the folder needs to be editable for each user (who gets their own configuration), so I can't put it in ProgramData.
Right now, I have but that only installs to the AppData/Roaming directory for the user who installs the program.

- 47
- 1
- 6
1 Answers
You can't do this directly during the initial installation. There are various approaches that will populate this on demand for each user, ranging from auto-repair invoked from advertised shortcuts, to leveraging active setup. But without a specific need to do this, I would suggest avoiding them. One of the most convincing reasons to avoid this is that uninstallation will only remove the files for the current user.
Instead I would suggest installing a shared template into the ProgramData if necessary, and copying the relevant pieces into the local/roaming folders in the application itself. The benefit is that it's clear what happens on removal: it's always left behind. For configuration data that a user may wish to keep, this is generally a good thing.

- 15,737
- 2
- 28
- 44
-
And, if the application uses .NET 2 or later, there is a feature-rich library for settings built-in, which could work if separate files aren't actually needed. Settings can contain semi-complex objects including arrays and XML documents. – Tom Blodget Aug 05 '16 at 13:09
-
Thanks! Is there a way to automatically copy the data from programdata into roaming folders through WiX? – HelloDog Aug 06 '16 at 17:06