When attempting to use your sample I get these errors

ICE79: Component 'Executable' referenced in column
'InstallExecuteSequence'.'Condition'
of row 'CAInstall.install' is invalid.    .\WixCustomActions.wxs    42
1    WixCustomActions
ICE79: Component 'Executable' referenced in column
'InstallExecuteSequence'.'Condition' of row 'CAInstall.install.SetProperty'
is invalid.    .\WixCustomActions.wxs    41    1    WixCustomActions
ICE79: Component 'Executable' referenced in column
'InstallExecuteSequence'.'Condition' of row 'CACommit.commit' is invalid.
.\WixCustomActions.wxs    44    1    WixCustomActions
ICE79: Component 'Executable' referenced in column
'InstallExecuteSequence'.'Condition' of row 'CACommit.commit.SetProperty' is
invalid.    .\WixCustomActions.wxs    43    1    WixCustomActions

My entire WixCustomActions file now looks like this

<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi";>
  <Product Id="{A62D5476-1335-4721-9CDA-E6F5B23E84F9}" Name="Hello world
sample" Language="1033"
           Version="1.0.0.0" Manufacturer="Hello World inc"
UpgradeCode="{298B84DE-352E-44F9-A043-202EC9A68DAC}">
    <Package InstallerVersion="200" Compressed="yes" Description="Hello
world installer" Comments="testpackage" />
    <Property Id="DiskPrompt" Value="the disk  prompt" />
    <Media Id="1" EmbedCab="yes" Cabinet="sample.cab" />

    <Binary Id="CustomUtil" SourceFile="HelloCustomAction.dll" />
    <Binary Id="InstallUtil"
SourceFile="C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727/InstallUtilLib.dll"
/>
    <Binary Id="VSDNETCFG" SourceFile="./VSDNETCFG.config" />
    <Binary Id="MSVBDPCADLL" SourceFile="./MSVBDPCA.DLL" />

    <Directory Id="TARGETDIR" Name="SourceDir">
      <Directory Id="ProgramFilesFolder" Name="PFiles">
        <Directory Id="INSTALLLOCATION"  Name="Hello world
dir">
          <Component Id="ProductComponent"
Guid="{95AD1474-BC7F-4B2A-808C-D10D4D0ED755}">
            <File Id="CustomFile"
Source="..\..\..\HelloCustomAction\bin\Debug\HelloCustomAction.dll"
Name="HelloCustomAction.dll" />
            <File Id='HelloWorldEXE' Name='HelloWorld.exe'
                  Source='..\..\..\HelloWorld\bin\Debug\HelloWorld.exe'
Vital='yes'/>
          </Component>
        </Directory>
      </Directory>
    </Directory>
    <Feature Id='Complete' Level='1'>
      <ComponentRef Id='ProductComponent' />
    </Feature>

    <!-- DIRCA_CheckFX will check for .NET FW, but also, as a side effect,
set required MSI properties (AFAIK required for using InstallUtilLib.dll)
-->
    <CustomAction Id="DIRCA_CheckFX"     BinaryKey="MSVBDPCADLL"
DllEntry="CheckFX" />
    <CustomAction Id="CAInstall.install" BinaryKey="InstallUtil"
DllEntry="ManagedInstall" Execute="deferred" />
    <CustomAction Id="CAInstall.install.SetProperty"
Property="CAInstall.install"
                  Value="/installtype=notransaction /action=install
/LogFile= /PS_DEF=[PS_DEF] /PS_ADR=&quot;[PS_ADR]&quot; /PS_BYP=[PS_BYP]
&quot;[#CustomFile]&quot; &quot;[VSDFxConfigFile]&quot;" />
    <CustomAction Id="CACommit.commit"    BinaryKey="InstallUtil"
DllEntry="ManagedInstall" Execute="commit" />
    <CustomAction Id="CACommit.commit.SetProperty"
Property="CACommit.commit"
                  Value="/installtype=notransaction /action=commit /LogFile=
&quot;[#CustomFile]&quot; &quot;[VSDFxConfigFile]&quot;" />

    <InstallExecuteSequence>
      <Custom Action="DIRCA_CheckFX" Sequence="1" />
      <Custom Action="CAInstall.install.SetProperty"
Before="CAInstall.install">$Executable&gt;2</Custom>
      <Custom Action="CAInstall.install"
Before="CACommit.commit.SetProperty">$Executable&gt;2</Custom>
      <Custom Action="CACommit.commit.SetProperty"
Before="CACommit.commit">$Executable&gt;2</Custom>
      <Custom Action="CACommit.commit"
Before="RegisterUser">$Executable&gt;2</Custom>
     </InstallExecuteSequence>
    </Product>
</Wix>

On Tue, Apr 29, 2008 at 2:39 PM, Holmgren Mathias <[EMAIL PROTECTED]>
wrote:

>  AFAIK, MSI can not call your managed code directly and there is no
> supported way to easily call into custom actions written in managed code.
>
>
>
> But you can use InstallUtilLib.dll from the framework directory to host an
> AppDomain and load+call your managed code custom action. I got the below to
> work by using dark to reverse engineer what Visual Studio does with it's own
> setup projects.
>
>
>
> WARNING – As far as I know this is all *undocumented* and likely very *
> unsupported* stuff. And I might not understand all the implications of
> what I did here.
>
>
>
> But it works – no C++ or unmanaged code necessary. J
>


On Tue, Apr 29, 2008 at 2:39 PM, Holmgren Mathias <[EMAIL PROTECTED]>
wrote:

>  AFAIK, MSI can not call your managed code directly and there is no
> supported way to easily call into custom actions written in managed code.
>
>
>
> But you can use InstallUtilLib.dll from the framework directory to host an
> AppDomain and load+call your managed code custom action. I got the below to
> work by using dark to reverse engineer what Visual Studio does with it's own
> setup projects.
>
>
>
> WARNING – As far as I know this is all *undocumented* and likely very *
> unsupported* stuff. And I might not understand all the implications of
> what I did here.
>
>
>
> But it works – no C++ or unmanaged code necessary. J
>
>
>
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to