Yonatan Karni
Yonatan Karni

Reputation: 977

same wix for 32 bit / 64 bit - how do I create conditional steps?

I'm trying to create a custom step in Wix(*), which will depend on the platform - 32 vs 64bit. any suggestions how to do that? (using WIX and not external stuff like writing a script)

(*) I need to use the appropriate InstallUtil version to install my snapin on a 64 bit / 32 bit machine.

Upvotes: 1

Views: 1079

Answers (1)

Yonatan Karni
Yonatan Karni

Reputation: 977

ok, thanks to my colleague guy y, here's a solution:

  <CustomAction Id="SetInstallUtilPath"
  Property="InstallUtilPath"
  Value="[WindowsFolder]\Microsoft.NET\Framework\v2.0.50727\installUtil.exe"/>
  <CustomAction Id="SetInstallUtil64Path"
  Property="InstallUtilPath"
  Value="[WindowsFolder]\Microsoft.NET\Framework64\v2.0.50727\installUtil.exe"/>

 <CustomAction Id="InstallMMC.Command"
   Property="InstallMMC"
   Value='"[InstallUtilPath]" "[INSTALLDIR]\mydll.dll"'/>
 <CustomAction Id="InstallMMC"
   BinaryKey="WixCA"
   DllEntry="CAQuietExec"
  Execute="deferred"
   Return="check"/>

Upvotes: 2

Related Questions