I'm using the CPack WIX generator to create an installer. The installer needs to install a file in a %ALLUSERSPROFILE%\foo\ folder on the target system.
I can't find a way to install files outside of the install tree (C:\Program Files\foo...)
How can this be accomplished?
I am not familiar with CPack, but the MSI System Folder Property for this is usually CommonAppDataFolder. So essentially you would use this as the target folder for the component hosting the files and resources you want installed in %ALLUSERSPROFILE%
.
Folder Redirection: Without digressing too much, you should probably be aware that some of these system folder properties redirect based on whether the package is installed per-machine or per-user - relating to the value of ALLUSERS during installation. See link for more information ("Installation Context" and "Single Package Authoring" are illuminating). The folder you mention should be stable and not redirect.
Personal opinion: This folder redirection and per-user install feature are among my least favorite parts of MSI. My take is to install per-machine, whenever possible. Importantly (and the reason for this small rant): A package capable of installing per-user, should not target CommonAppDataFolder
at all (since it does not redirect to a per-user target).
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