I created a custom UI for my Wix Bundle in WPF with overriding the Bootstrapper Application Class, and I'm struggling with a variable that I need to access and modify if needed from the UI. This variable is the install folder path (string) of the msi deployed by the bootstrapper.

I followed what I found on many forums but It's not working, I can't access this variable. Here is my code:

Msi installer:

```
<Product ...>
  <Feature ...
           ConfigurableDirectory="INSTALLFOLDER"
           ...>
</Product>

<Directory Id="TARGETDIR" Name="SourceDir">
  <Directory Id="ProgramFilesFolder">
    <Directory Id="ManufacturerFolder" Name="...">
      <Directory Id="INSTALLFOLDER" Name="!(bind.property.ProductName)"/>
    </Directory>
  </Directory>
</Directory>

```

Bundle:

```
<Variable Name="InstallFolder" bal:Overridable="yes" />

<Chain>
      <MsiPackage ...
                  ForcePerMachine="yes"
                  Compressed="no"
                  Visible="no"
                  EnableFeatureSelection="yes"
                  Vital="yes">
        <MsiProperty Name="INSTALLFOLDER" Value="[InstallFolder]" />
      </MsiPackage>
      ...
</Chain>

```

C# Managed Bootstrapper Application:

```
if (Bootstrapper.Engine.StringVariables.Contains("InstallFolder"))
  installFolder = Bootstrapper.Engine.StringVariables["InstallFolder"];

```

The "installFolder" variable is always null... I really don't know what is wrong with my code. Hope someone can help me. Thank you

> 
> Edit:
> 
> 
> I changed the bundle variable as suggested by Pavel with a default
>  value, now even if I still can't get the value returned by the MSI, I
>  can set Bootstrapper.Engine.StringVariables["InstallFolder"] to a
>  value and it's passed correctly to the msi.
> 
> 
>