I am new to wix and I have a quick solution ...
Here is my problem, I have an installer that installs and registers some DLL, but we donβt want to install the second DLL on the 64-bit architecture.
Here is a diagram of our current installer file: ... ...
I tried to add a condition like this
<Directory Id="INSTALLDIR" .....> <Component Id="IDDLL" Guid="20E4601C-D93C-4A86-A0D9-31145D5443E6"> <File Id="common.dll" Name="common.DLL" .... SelfRegCost="1"/> <File Id="for32bits.dll" Name="for32bits.DLL" .... SelfRegCost="1"/> <Condition> %PROCESSOR_ARCHITECTURE="x86" </Condition> </Component> <Component Id="IDDLL" Guid="20E4601C-D93C-4A86-A0D9-31145D5443E6"> <File Id="common.dll" Name="common.DLL" .... SelfRegCost="1"/> <Condition> %PROCESSOR_ARCHITECTURE~="x86" </Condition> </Component> </Directory>
This does not work (duplicate character errors)
I also tried with an if statement, but it looks processed at compile time, so it didn't work either:
<Directory Id="INSTALLDIR" .....> <Component Id="IDDLL" Guid="20E4601C-D93C-4A86-A0D9-31145D5443E6"> <File Id="common.dll" Name="common.DLL" .... SelfRegCost="1"/> <? if %PROCESSOR_ARCHITECTURE = "x86" ?> <File Id="for32bits.dll" Name="for32bits.DLL" .... SelfRegCost="1"/> <?endif?> </Component> </Directory>
Can someone let me know how to do this?
source share