title: Registering COM EXE with WIX
body: <p>I created a solution with two new projects: <code>ATLProject1</code> which is a COM dll and <code>ATLProject2</code> which is a COM EXE. To both projects added same simple class with single method.</p>
  <p>Added both to WIX setup project (this is an existing setup project that already installs other COM dlls. I'm just using it for this test).</p>
  <p>Added following lines to product.wxs:</p>
  <pre><code>        &lt;Component Id=&quot;ATLProject1.dll&quot; Guid=&quot;{...}&quot;&gt;
            &lt;File Id=&quot;ATLProject1.dll&quot; Name=&quot;ATLProject1.dll&quot; KeyPath=&quot;yes&quot; SelfRegCost=&quot;0&quot; Source=&quot;$(var.TargetDir)\ATLProject1.dll&quot; /&gt;
          &lt;/Component&gt;
          &lt;Component Id=&quot;ATLProject2.exe&quot; Guid=&quot;{...}&quot;&gt;
            &lt;File Id=&quot;ATLProject2.exe&quot; Name=&quot;ATLProject2.exe&quot; KeyPath=&quot;yes&quot; SelfRegCost=&quot;0&quot; Source=&quot;$(var.TargetDir)\ATLProject2.exe&quot; /&gt;
          &lt;/Component&gt;
  </code></pre>
  <p>and also</p>
  <pre><code>  &lt;ComponentRef Id=&quot;ATLProject1.dll&quot; /&gt;
    &lt;ComponentRef Id=&quot;ATLProject2.exe&quot; /&gt;
  </code></pre>
  <p>The file also has these lines:</p>
  <pre><code>&lt;EnsureTable Id=&quot;PublishComponent&quot;/&gt;
  &lt;EnsureTable Id=&quot;Condition&quot;/&gt;
  &lt;EnsureTable Id=&quot;TypeLib&quot;/&gt;
  &lt;EnsureTable Id=&quot;Class&quot;/&gt;
  &lt;EnsureTable Id=&quot;Extension&quot;/&gt;
  </code></pre>
  <p>When running the setup I get error: <strong>&quot;Module ATLProject2.exe failed to register. HRESULT -2147024769&quot;</strong> (hex 0x8007007f the specified procedure cannot be found).</p>
  <p>If I remove <code>ATLProject2</code> from setup, it succeeds and <code>ATLProject1</code> is correctly registered in registry (this is without generating registry information e.g. using heat, it just works).</p>
  <p>Should exe component be treated differently?</p>
  <p>I found <a href="http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Heat-and-exe-COM-objects-td3908196.html" rel="nofollow noreferrer">this 10 year old post suggesting heat.exe does not treat COM exe as COM</a>. If this is the problem, Not sure if this is still the case?</p>