Indeed, ideally the merge module should be rebuilt. At the moment that
isn't possible, however with a bit of help from 'dark' and installation log
files I've found what appears to be a solution to the problem. MSMs built
with Visual Studio Deployment tool which use this InstallUtil (which
installs services) require the some additional support files and properties
to be set-up - basically it seems a .config file is required for the custom
action that calls InstallUtil, and this config file is specified in the
property VSDFxConfigFile.

Here's the custom action from the msm:
<CustomAction
Id="_A4F7837B_2392_4158_813E_D7618531FAEA.install.SetProperty"
Property="_A4F7837B_2392_4158_813E_D7618531FAEA.install"
Value="/installtype=notransaction /action=install /LogFile=
&quot;[#_F3A6C070A322F89D287883E856E3F8EA.809DF207E0AD42C087209A70CE3641DD]&quot;
&quot;[VSDFxConfigFile]&quot;" />

So to provide that config file [VSDFxConfigFile], I used dark to extract
two binary files from a MSI created using VS Deployment tool:
* VSDNETCFG - this is the app.config file
* MSVBDPCADLL - a custom action DLL that reads various VSDxxx properties
and sets the VSDFxConfigFile property

Once I had those files, I added these lines in to my Wix project file (that
references the merge module).

    <Binary Id="VSDNETCFG" SourceFile="SupportFiles\VSDNETCFG"/>
    <Binary Id="MSVBDPCADLL" SourceFile="SupportFiles\MSVBDPCADLL"/>
    <Property Id="VSDFrameworkVersion" Value="v4.0" />
    <Property Id="VSDFrameworkProfile" Value="Client" />
    <Property Id="VSDNETMSG" Value="This setup requires the .NET Framework
version [1].  Please install the .NET Framework and run this setup again."
/>
    <Property Id="VSDNETURLMSG" Value="This setup requires the .NET
Framework version [1].  Please install the .NET Framework and run this
setup again.  The .NET Framework can be obtained from the web.  Would you
like to do this now?" />
    <CustomAction Id="DIRCA_CheckFX" Return="check" BinaryKey="MSVBDPCADLL"
DllEntry="CheckFX" />
    <CustomTable Id="_VsdLaunchCondition">
            <Column Id="Condition" PrimaryKey="yes" Type="string"
Width="255" Category="Condition" Description="Expression which must
evaluate to TRUE in order for install to commence." Modularize="Condition"
/>
            <Column Id="Description" Type="string" Width="255"
Localizable="yes" Category="Formatted" Description="Localizable text to
display when condition fails and install must abort." Modularize="Property"
/>
            <Column Id="Url" Type="string" Width="0" Category="Text"
Description="URL to navigate to when condition fails and install must
abort." />
            <Row>
                <Data Column="Condition">VSDFXAvailable</Data>
                <Data Column="Description">[VSDNETURLMSG]</Data>
                <Data Column="Url">
http://go.microsoft.com/fwlink/?LinkId=131000</Data>
            </Row>
    </CustomTable>

Then in InstallExecuteSequence / InstallUISequence I call that custom
action:

    <InstallExecuteSequence>
      <Custom Action="DIRCA_CheckFX" Sequence="2" />
    </InstallExecuteSequence>

At least this stops the error 1001 occurring (I've not yet verified that
the service installed by the MSM is actually working!)



On 2 November 2011 19:34, Wilson, Phil <phil.wil...@invensys.com> wrote:

> I have heard that there is an issue with VS 2010 merge modules where they
> always install files to the Module Retargetable Folder instead of the
> intended one. That may have something to do wth it. Other issues may occurr
> when InstallUtilLib.dll is 32-bit and you attempt to use it on a 64-bit
> system.
>
> If there is any way you can re-build that merge module, you should do it.
> Even in the dubious world of using installer classes to install services
> you never needed to run InstallUtil.exe. The setup will call installer
> class custom actions without running InstallUtil.exe. There's nothing that
> special about .NET services, so if possible convert that merge module to
> WiX and use the built-in ServiceInstall elements that populate the
> ServiceInstall table in the MSI file.
>
> Phil
>
> ________________________________________
> From: Aled Hughes [trestlemon...@gmail.com]
> Sent: Wednesday, November 02, 2011 10:34 AM
> To: wix-users@lists.sourceforge.net
> Subject: [WiX-users] Error with InstallUtilLib.dll: CoreBindToRuntimeHost
>       path not found error.
>
> Hi, I have a merge module that was authored using the VisualStudio 2010
> installer and this MSM installs a windows server and has a custom action
> that registers the service using the InstallUtil program.
> However, when I use that MSM in a MSI authored using WiX 3.5, I get the
> following error on installation:
>
> "Error 1001. InstallUtilLib.dll: CorBindToRuntimeHost (hr=0x80070003): The
> system cannot find the path specified."
>
> .Net4 is already installed on the machine.
>
> When the MSM was included in a MSI authored using the VS2010 installer tool
> the problem did not occur. I needed to move from the VS2010 installer to a
> WiX installer to allow for more flexibility.
>
> Any ideas as to what the cause of this is?
>
> ------------------------------------------------------------------------------
> RSA&#174; Conference 2012
> Save $700 by Nov 18
> Register now&#33;
> http://p.sf.net/sfu/rsa-sfdev2dev1
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
> *** Confidentiality Notice: This e-mail, including any associated or
> attached files, is intended solely for the individual or entity to which it
> is addressed. This e-mail is confidential and may well also be legally
> privileged. If you have received it in error, you are on notice of its
> status. Please notify the sender immediately by reply e-mail and then
> delete this message from your system. Please do not copy it or use it for
> any purposes, or disclose its contents to any other person. This email
> comes from a division of the Invensys Group, owned by Invensys plc, which
> is a company registered in England and Wales with its registered office at
> 3rd Floor, 40 Grosvenor Place, London, SW1X 7AW (Registered number 166023).
> For a list of European legal entities within the Invensys Group, please go
> to http://www.invensys.com/en/legal/default.aspx.
>
> You may contact Invensys plc on +44 (0)20 3155 1200 or e-mail
> recept...@invensys.com. This e-mail and any attachments thereto may be
> subject to the terms of any agreements between Invensys (and/or its
> subsidiaries and affiliates) and the recipient (and/or its subsidiaries and
> affiliates).
>
>
>
>
> ------------------------------------------------------------------------------
> RSA(R) Conference 2012
> Save $700 by Nov 18
> Register now
> http://p.sf.net/sfu/rsa-sfdev2dev1
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
>
------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to