[wix-users] How to specify the custom installation directory for a bundle?

Roy Zhang Roy.Zhang at improving.com
Wed Mar 29 13:56:36 PDT 2023


I am working on an installer which has 2 packages to install. My product and the dependency VC_redist.x64.exe. So I have two Wix files, myproduct.wxs.in and myproduct-bundle.wxs.in.x64. In myproduct.wxs.in the installation directory has been specified as below. In the bundle file I have specified a variable InstallFolder. But I found when I tested the installer, I could specify a custom directory. But the custom directory could not be created or used. The Directory in myproduct.wxs.in seems could not be used to custom a installation directory. Searched Wix document and did not find any helpful info. Is there a good way to do this? I am using Wix3. Thanks in advance!

 <Directory Id='TARGETDIR' Name='SourceDir'>
      <Directory Id='ProgramFiles' Name='@WIX_PROGRAM_FILES_FOLDER_ID@'>
          <Directory Id='Product' Name='MyProduct'>
              <Directory Id='INSTALLDIR' Name='MyApp'>

          Manufacturer='@WIX_MANUFACTURER@' UpgradeCode='@WIX_BUNDLE_UPGRADE_CODE@'>


    <Variable Name="InstallFolder" Type="string" Value="[ProgramFilesFolder]MyProduct\MyApp" />



More information about the wix-users mailing list