title: Why I am getting blank value for SourceDir in a managed Custom Action in WIX?
body: <p>Here is the code for the Product.wxs I am using:</p>
  
  <pre><code>&lt;Product Id="*" Name="abc" Language="1033" Version="1.0.0.0" Manufacturer="def" UpgradeCode="2b75c560-783e-4688-9a02-da09bf986597"&gt;
      &lt;Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" /&gt;
  
      &lt;MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." /&gt;
      &lt;MediaTemplate /&gt;
  
      &lt;Binary Id="myCustomActionsDLL" SourceFile="..\SetupConfiguration\bin\debug\SetupConfiguration.CA.dll" /&gt;
      &lt;CustomAction Id="SetProperty" Execute="immediate"
                          Property="CA_myCustomAction"
                          Value="InstallDir=[MergeRedirectFolder];SourceDir=[SourceDir]" /&gt;
      &lt;CustomAction Id="CA_myCustomAction"
          BinaryKey="myCustomActionsDLL"
          DllEntry="SetABCConfiguration"
          Execute="deferred" Impersonate="no"
          Return="check" /&gt;
  
      &lt;InstallExecuteSequence&gt;
        &lt;Custom Action="SetProperty" After="InstallInitialize"&gt;Not Installed&lt;/Custom&gt;
        &lt;Custom Action="CA_myCustomAction" Before="InstallFinalize"&gt;Not Installed&lt;/Custom&gt;
      &lt;/InstallExecuteSequence&gt;
  
      &lt;Feature Id="ProductFeature" Title="abc" Level="1"&gt;
        &lt;ComponentGroupRef Id="ABCGroup" /&gt;
      &lt;/Feature&gt;
    &lt;/Product&gt;
  
    &lt;Fragment&gt;
      &lt;Directory Id="TARGETDIR" Name="SourceDir"&gt;
        &lt;Directory Id="ProgramFilesFolder"&gt;
          &lt;Directory Id="def" Name="def"&gt;
            &lt;Directory Id="dirFC83E07AC2C77525961486C88A01C277" Name="ABC"&gt;
              &lt;Directory Id="MergeRedirectFolder"/&gt;
            &lt;/Directory&gt;
            &lt;/Directory&gt;
        &lt;/Directory&gt;
      &lt;/Directory&gt;
    &lt;/Fragment&gt;
  
  [CustomAction]
  public static ActionResult SetABCConfiguration(Session session)
  {
      string strSourceFolder = session.CustomActionData["SourceDir"]; // returning blank value
      string strWebGeniePhyPath = session.CustomActionData["InstallDir"]; // returning correct value
  }
  </code></pre>
  
  <p>I have deliberately left out the code for component <code>ABCGroup</code>, it just contains a heat harvested directory, which is a long list.</p>
  
  <p>Please help.</p>