[wix-users] CustomAction does not seem to be called from the msi

Urban Olars urban.olars at gmail.com
Wed Feb 8 22:17:09 PST 2017


Unfortunately, it did not help to set Before"LaunchConditions" either. I
will have to try logging and Orca. Maybe that will give me a hint of what
is going wrong.

2017-02-07 20:13 GMT+01:00 Edwin Castro <egcastr at gmail.com>:

> On Tue, Feb 7, 2017 at 12:13 AM, Urban Olars <urban.olars at gmail.com>
> wrote:
> > Hi,
> >
> > I am trying to learn how to write custom actions in C++ and how to use
> them
> > in my msi installation project. Unfortunately with no luck so far. I have
> > looked at numerous examples I have found on internet but still have not
> > found out what I am doing wrong. I kindly ask for input from someone on
> > this mailing list. Thank you in advance.
> >
> >
> > This is part of the code in my *.wxs file:
> > <Binary Id="CAICRoot"
> > SourceFile="..\CustomActions\CustomActions\bin\Release\CustomActions.dll"
> />
> > <CustomAction Id="IronCADRootDirectory" BinaryKey="CAICRoot"
> > DllEntry="GetICRootDir" Execute="firstSequence" HideTarget="no" />
> >
> > <InstallExecuteSequence>
> > <Custom Action='IronCADRootDirectory' Before='InstallInitialize'/>
> > <RemoveExistingProducts Before="InstallInitialize"></
> RemoveExistingProducts>
> > </InstallExecuteSequence>
> >
> > <Condition Message="IronCAD root directory not found. Installation
> > aborting">
> > <![CDATA[ICROOTDIR]]>
> > </Condition>
> > ...
> > ...
> >
>
> Check the InstallExecuteSequence table in your compiled MSI in Orca or
> InstEdit. I expect that the LaunchConditions action is scheduled to
> run before IronCADRootDirectory. In other words, you are checking if
> the ICROOTDIR property is set well before your custom action runs. If
> this is the case then scheduling the custom action before
> LaunchConditions should fix it:
>
> <InstallExecuteSequence>
>   <Custom Action="IronCADRootDirectory" Before="LaunchConditions"/>
> </InstallExecuteSequence>
>
> --
> Edwin G. Castro
>
> ____________________________________________________________________
> WiX Toolset Users Mailing List provided by FireGiant
> http://www.firegiant.com/
>



-- 
/Urban Olars


More information about the wix-users mailing list