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

Rob Mensching rob at firegiant.com
Wed Mar 29 17:29:06 PDT 2023


The wix-users mailing list is being deprecated. Use the GitHub Discussions (https://github.com/orgs/wixtoolset/discussions) instead now.

-----Original Message-----
From: wix-users <wix-users-bounces at lists.wixtoolset.org> On Behalf Of Roy Zhang via wix-users
Sent: Wednesday, March 29, 2023 1:57 PM
To: wix-users at lists.wixtoolset.org
Cc: Roy Zhang <Roy.Zhang at improving.com>
Subject: [wix-users] How to specify the custom installation directory for a bundle?

Hi,

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!

--myproduct.wxs.in
 <Directory Id='TARGETDIR' Name='SourceDir'>
      <Directory Id='ProgramFiles' Name='@WIX_PROGRAM_FILES_FOLDER_ID@'>
          <Directory Id='Product' Name='MyProduct'>
              <Directory Id='INSTALLDIR' Name='MyApp'>
              ......
              </Directory>
          </Directory>
      </Directory>
  </Directory>

--myproduct-bundle.wxs.in.x64
  <Bundle Name='@WIX_PRODUCT_NAME@' Version='@CMAKE_PROJECT_VERSION@'
          Manufacturer='@WIX_MANUFACTURER@' UpgradeCode='@WIX_BUNDLE_UPGRADE_CODE@'>

    ......

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

    ......
  </Bundle>


Best,
Roy

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/


More information about the wix-users mailing list