I am creating an MSI using WIX which requires a specific version of an MS VC 2008 x64 Redistributable. The MSI is also for an x64 based product.
I have the Microsoft vcredist_setup.exe
for the 64-bit version of the redistributable that I need (I renamed it to vc90redist_x64.exe
for my own reference).
Here is the WiX XML I am using to define the binary:
<Binary Id='_VC_X64_REDIST_' SourceFile='redist\vc90redist_x64.exe' />
And the custom action:
<CustomAction Id='_INSTALL_REDIST_'
BinaryKey='_VC_X64_REDIST_'
ExeCommand='/q /l c:\temp\vc.log'
Execute='deferred'
Return='asyncWait' />
Note: I added the '/l c:\temp\vc.log' to see if the EXE file was ever getting to the point of trying to install.
Note: I have tried Return='check'
and Execute='Immediate'
.
And calling the custom action..
<InstallExecuteSequence>
<Custom Action='_INSTALL_REDIST_' After='InstallFiles'>
NOT Installed
</Custom>
</InstallExecuteSequence>
Note: I have tried various After/Before values, and the above one seems to give me the best results in the log file! But still no install.
When I run the install MSI file, my product gets installed, but the redistributable does not (that is, the C:\temp\vc.txt
does not get created. If I run the redistributable manually afterward it prompts me to install; there is no entry in the 'Remove Programs' list).
Using the above settings I get the following when run with
'msiexec /i my.msi /l*v log.txt'
Here is an extract of the log (scroll right to see the complete lines):
Action ended 10:54:27: InstallFiles. Return value 1.
MSI (s) (64:E8) [10:54:27:655]: Doing action: _INSTALL_REDIST_
MSI (s) (64:E8) [10:54:27:655]: Note: 1: 2205 2: 3: ActionText
Action start 10:54:27: _INSTALL_REDIST_.
Action ended 10:54:27: _INSTALL_REDIST_. Return value 1.
...
MSI (s) (64:E8) [10:54:50:905]: Executing op: ActionStart(Name=_INSTALL_REDIST_,,)
MSI (s) (64:E8) [10:54:51:233]: Executing op: CustomActionSchedule(Action=_INSTALL_REDIST_,ActionType=1154,Source=BinaryData,Target=/q /l c:\temp\vc.log,)
...
MSI (s) (64:E8) [10:54:51:889]: Executing op: ActionStart(Name=PublishFeatures,Description=Publishing Product Features,Template=Feature: [1])
MSI (s) (64:E8) [10:54:51:889]: Executing op: FeaturePublish(Feature=Complete,,Absent=2,Component=<VERY LONG BINARY ASCII LOOKING THING>
... 1: _INSTALL_REDIST_ 2: 1631
...
And that's the last mention of _INSTALL_REDIST_ in the log.
How do I fix this problem?
(I scoured Stack Overflow and most WiX references and blogs, but I have not managed to get this going)