0

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)

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
grillp
  • 1,273
  • 1
  • 11
  • 13
  • 2
    I think the redist has an MSI included. You cannot run an MSI from an MSI. Take the merge modules instead or use the redist as prerequisites. – harper Jul 02 '12 at 07:32
  • Thx @harper. When you say use the redist as a prerequisite what do you mean? – grillp Jul 02 '12 at 10:56
  • 3
    You will have to build a bootstrapper. It's generated with MSBUILD that you use anyway when you build you WiX project in Visual Studio. see: http://wix.sourceforge.net/manual-wix3/install_dotnet.htm, http://stackoverflow.com/questions/4758862/how-to-install-redistributable-package-of-net-framework-with-wix – harper Jul 02 '12 at 11:19
  • Thanks all.. Ended up including the Merge Modules for VC.. can;t use an exe as I need an MSI for SCCM (ex-SMS) based install.. – grillp Jul 20 '12 at 01:26
  • You _can_ use the Merge Modules. This will include the DLLs in your MSI installer. When you install you product and another program depends on the runtime, it will break when you uninstall your product. That's a bug in the other's installer. But when you build a bootstrapper it will install the prerequisite "MSVC runtime" is _not included_ in your MSI installer. Instead you find a distinct MSCV runtime product in "Add/Remove-Programs". This might be desirable. – harper Jul 20 '12 at 12:31

0 Answers0