Environment: Windows 7 x86 SP1, Wix Toolset 3.10
Below is the installer wxs ignoring the INSTALLDIR.
Here is the WiX XML:
<?xml version="1.0" encoding="utf-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="*" Name="HelloWix Sample 1.0" Language="1041" Version="1.0.0"
Manufacturer="CM" UpgradeCode="PUT-GUID-HERE" Codepage="932">
<Package Description="Simple Message to standard output"
Comments="This installer database contains the logic and data required
to install HelloWix Sample." InstallerVersion="200" Compressed="yes"
SummaryCodepage="932" />
<Media Id="1" Cabinet="simple.cab" EmbedCab="yes" />
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder" Name="PFiles">
<Directory Id="hellowix" Name="hellowix">
<Component Id="HelloWix.cmd" Guid="*">
<File Id="HELLOWIX.CMD" Name="HelloWix.cmd" Source="HelloWix.cmd" />
</Component>
</Directory>
</Directory>
</Directory>
<Feature Id="DefaultFeature" Title="Main Feature" Level="1">
<ComponentRef Id="HelloWix.cmd" />
</Feature>
<UI />
<UIRef Id="WixUI_InstallDir" />
<Property Id="WIXUI_INSTALLDIR" Value="hellowix" />
<!--Added the following line:-->
<Property Id="INSTALLFOLDER" Secure="yes" />
</Product>
</Wix>
I think it is a related topic of http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Installer-ignores-InstallDir-directory-change-td6677782.html. So I added only one line; to the next line of Property Id="WIXUI_INSTALLDIR" as shown above:
<!--Added the following line:-->
<Property Id="INSTALLFOLDER" Secure="yes" />
Then my installer got Error Code 2343...What's wrong?