Naveed Butt
Naveed Butt

Reputation: 2901

WIX property NETFRAMEWORK40FULLINSTALLROOTDIR is blank

I am trying to register my COM Add-in using the RegAsm command using the WIX Setup. But am unable to do it. It is showing blank against the WixNetFxExtension's NETFRAMEWORK40FULLINSTALLROOTDIR or even NETFRAMEWORK40CLIENTINSTALLROOTDIR.

Here is the code for the custom action:

<CustomAction Id="RegisterUsingRegAsm" Directory="PROOFIX_ADDIN" Execute="deferred" Impersonate="no" Return="check"
              ExeCommand='"[NETFRAMEWORK40FULLINSTALLROOTDIR]regasm.exe" "[PROOFIX_ADDIN]Proofix.View.dll" /codebase' />

When I try to hardcode the path C:\Windows\Microsoft.NET\Framework\v4.0.30319\regasm.exe. It works fine...

and Here is the Sequence information:

<InstallExecuteSequence>
  <Custom Action="RegisterUsingRegAsm" Before="InstallFinalize" />
</InstallExecuteSequence>

Here is the log generated for the installer:

Action: RegisterUsingRegAsm, location: C:\Users\naveed.butt\AppData\Local\Optimentor\Proofix\, command: "regasm.exe" "C:\Users\naveed.butt\AppData\Local\Optimentor\Proofix\Proofix.View.dll" /codebase

Upvotes: 0

Views: 931

Answers (1)

Morten Frederiksen
Morten Frederiksen

Reputation: 5165

First of all you are missing a PropertyRef

Like this:

<PropertyRef Id="NETFRAMEWORK40CLIENTINSTALLROOTDIR"/>

Second issue if you are on a 64 bit windows you should use the 64 bit variable:

NETFRAMEWORK40CLIENTINSTALLROOTDIR64

However you can handle 32/64 bit Windows OS with conditions. You can get inspiration from this answer: https://stackoverflow.com/a/12514596/600559

Upvotes: 1

Related Questions