I'm trying to build a very simple installer that just installs the package as a "per-user" application. No dialogs, just always install into the local app data folder. And it's ignoring me. And always installing to C:\Program Files.
I've set the InstallScope to "perUser", but left the installation directory as "ProgramFilesFolder". The documentation seems to suggest that that SHOULD get redirected, but that isn't happening.
Setup file below...
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="*"
Name="MyApplication"
Language="1033"
Version="1.0.0"
Manufacturer="MyCompany"
UpgradeCode="19E4E10A-558C-4D4A-BD2A-D6B8060FB917">
<Package
InstallerVersion="500"
Compressed="yes"
InstallPrivileges="limited"
InstallScope="perUser" />
<MajorUpgrade
DowngradeErrorMessage="A newer version of MyApplication is already installed." />
<MediaTemplate
EmbedCab="yes" />
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="INSTALLDIR" Name="MyCompany MyApplication">
<Directory Id="JreFolder" Name="jre"/>
<Directory Id="LibFolder" Name="lib"/>
</Directory>
</Directory>
<Directory Id="ProgramMenuFolder">
<Directory Id="ApplicationProgramsFolder" Name="MyCompany MyApplication"/>
</Directory>
</Directory>
<DirectoryRef Id="INSTALLDIR">
<Component Id="CMP_MyApplication.exe">
<File Id="FILE_MyApplication.exe" Source="MyApplication.exe" KeyPath="yes"/>
</Component>
<Component Id="CMP_MyApplication.ini">
<File Id="FILE_MyApplication.l4j.ini" Source="MyApplication.l4j.ini" KeyPath="yes"/>
</Component>
</DirectoryRef>
<DirectoryRef Id="ApplicationProgramsFolder">
<Component Id="CMP_StartMenuShortcut" Guid="0B96A876-70FB-4E8E-8D27-B9B1E40C9B4D">
<Shortcut Id="ApplicationStartMenuShortcut" Name="MyCompany MyApplication" Description="MyCompany MyApplication"
Target="[#FILE_MyApplication.exe]" WorkingDirectory="INSTALLDIR"/>
<RemoveFolder Id="CleanUpShortCut" Directory="ApplicationProgramsFolder" On="uninstall"/>
<RegistryValue Root="HKCU" Key="Software\MyCompany\MyApplication" Name="Installed" Type="integer" Value="1" KeyPath="yes" />
</Component>
</DirectoryRef>
<Feature Id="MainApplication" Title="Main Application" Level="1" >
<ComponentGroupRef Id="JreGroup"/>
<ComponentGroupRef Id="LibGroup"/>
<ComponentRef Id="CMP_MyApplication.exe"/>
<ComponentRef Id="CMP_MyApplication.ini"/>
<ComponentRef Id="CMP_StartMenuShortcut"/>
</Feature>
</Product>
</Wix>