I have to create an installation package using Wix. If an admin user is installing the package, it should install into %programfiles%/[applicationName], if the user is an non-admin user then it should install into its local profile folder( LocalAppDataFolder).
How it is possible?
Set property ALLUSERS to 2. See also Single Package Authoring.
I wrote this for ClickThrough a long time ago. Solution from that looks a lot like this (You provide a Property called "ApplicationFolderName"):
Overriding ProgramFilesFolder property as following should work:
you code can not work on my wix project currently i use AdminUser="1" to judge if we are under admin privilege