I have an MSI file that is installing a folder with a bunch of files inside it. I have a location that I am putting the files in:
Windows XP: C:\Documents and Settings\All Users\Documents\MyFolder
Windows 7: C:\Users\Public\Documents\MyFolder
The issue is that I do not want to hardcode these paths, but no matter where I look I cannot find out how to do this, because everywhere I look they are talking about making shortcuts for all users and that is not what I am trying to do. How can one install a folder to an "All Users" location?
Something like this:
<PropertyRef Id="WIX_DIR_COMMON_DOCUMENTS" />
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="WIX_DIR_COMMON_DOCUMENTS">
<Directory Id="MyFolder" Name="MyFolder">
Windows Installer does not have a property for that folder, but a WiX-provided custom action does.
Per the documentation on the OSInfo custom actions:
Define the property via a reference:
Then, define the directory somewhere under the
TARGETDIR
directory. For example: