sean717
sean717

Reputation: 12663

Is there WiX pre-defined variable for "C:\Users\Public" folder?

I want to install some files to a folder located at "C:\Users\Public\MyApp". Is there a pre-defined variable in WiX that resolves to "C:\Users\Public" in Windows 7 and equivalent location in other versions of Windows?

Upvotes: 0

Views: 2433

Answers (2)

sean717
sean717

Reputation: 12663

This problem is solved as below:

<Directory Id="UserPublicMyAppFolder" Name="MineSched">
</Directory>

<SetDirectory Id="UserPublicMyAppFolder" Value="C:\Users\Public\MyApp" />

Upvotes: 0

Tom Blodget
Tom Blodget

Reputation: 20772

No. WiX defines only these variables in Setup projects:

sys.CURRENTDIR
sys.SOURCEFILEPATH
sys.SOURCEFILEDIR
sys.PLATFORM

And WiX variables are only used when the setup package is built.

You probably mean Windows Installer properties. They depend on the Windows Installer version are listed here. Note: when reading the required version of Windows Installer, the docs do you the disservice of listing the minimum version that could actually be installed on a particular operating system version. The minimum version to support a property would be the lowest of those.

The answer is still "no." In fact, there isn't even a CSIDL API to locate that folder. As of Windows Vista, there is a FOLDERID API, though Windows Installer doesn't use it.

The point is, that's not where installed files go! Please consider [CommonAppDataFolder].

Upvotes: 2

Related Questions