[wix-users] SetDirectory Issue

Ven H venh.123 at gmail.com
Tue Feb 6 21:52:09 PST 2018


Hi,

I have the following fragment in my Product.wxs

<Fragment>
    <Directory Id="TARGETDIR" Name="SourceDir">
      <Directory Id="ProgramFilesFolder">
        <Directory Id="APP_DIR" Name="TestAppDir">
          <Directory Id="INSTALLDIR" Name="[APP_DIR]"/>
        </Directory>
        <Directory Id="DB_DIR" Name="TestDBDir" />
      </Directory>
    </Directory>
  </Fragment>

The APP_DIR and DB_DIR are two properties in a custom UI Dialog which are
assigned from the Browse option.

In another wxs file, I have the below section inside a fragment

<DirectoryRef Id="INSTALLDIR">
      <Directory Id="TESTVDDIR" Name="TESTVD" />
    </DirectoryRef>
    <SetDirectory Id="TESTVDDIR" Value="[INSTALLDIR]TESTVD"
Sequence="execute" />

After installation, I can see that the TESTVD gets created TestAppDir, even
though I browse some other directory during installation. I even tried
assigning the APP_DIR property to INSTALLDIR, but no luck. It is creating a
directory called [APP_DIR] inside TestAppDir inside Program Files (x86)
folder. How can I ensure SetDirectory element gives me full control of the
path during installation?


Regards,
Venkatesh


More information about the wix-users mailing list