A merge module just wraps a set of components - it's a useful self-contained 
package to include in a build of an MSI file, and once it's inside the MSI file 
it's just a set of components. Modules don't get installed, components do, so 
you need a check that the component is being selected for installation by 
checking its action state:

http://msdn.microsoft.com/en-us/library/aa368012(VS.85).aspx 

$ComponentName=3 is a typical condition on whether the component is marked for 
installation. 

Phil Wilson 


-----Original Message-----
From: Shree Krishnamurthi [mailto:shree.krishnamur...@proximex.com] 
Sent: Thursday, June 04, 2009 11:41 AM
To: wix-users@lists.sourceforge.net
Subject: Re: [WiX-users] WiX-users Digest, Vol 37, Issue 21

My mistake, I assumed that the entire module is executed at one time.

Is there any variable that I can use to check if a certain module is
selected for installation?


- Shree

------------------------------

Message: 6
Date: Thu, 4 Jun 2009 11:22:08 -0700
From: "Wilson, Phil" <phil.wil...@wonderware.com>
Subject: Re: [WiX-users] Custom Action in Merge Module
To: General discussion for Windows Installer XML toolset.
        <wix-users@lists.sourceforge.net>
Message-ID:
        
<5c889913ff236e4190093af280ab4ec4016c370...@wwlkfmail1.wonderware.com>
Content-Type: text/plain; charset="us-ascii"

Whether files or registry entries get copied or created is subject to
component and feature state conditions. Whether custom actions get
called or not is another set of conditions on each custom action. 

If you can treat a merge module as a self-contained unit ("object
oriented") then the custom action conditions in the merge module should
always work properly - for example if they have conditions based on
whether their components are being installed/uninstalled etc.  

Phil Wilson 


-----Original Message-----
From: Shree Krishnamurthi [mailto:shree.krishnamur...@proximex.com] 
Sent: Thursday, June 04, 2009 10:09 AM
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] Custom Action in Merge Module

Do MM custom actions get triggered even if the module/feature is not
selected for installation?

I have included 2 merge modules in my setup something like: 

                <Directory Id="TARGETDIR" Name="SourceDir">
                        <Directory Id="WEBDIR" Name="Inetpub">
                                <Directory Id="PxWS" Name="PxWS">
                                        <Merge Id='PxWSModule'
Language='1033' SourceFile='../Release/PxWSMergeModule.msm' DiskId='1'>
                                                <ConfigurationData
Name="PxFolder_Property" Value="[INSTALLLOCATION]" />
                                        </Merge> 
                                </Directory>
                        </Directory>
 
                        <Directory Id="ProgramFilesFolder">
                                <Directory Id="INSTALLLOCATION"
Name="Proximex">
                                        <Merge Id='PxDbModule'
Language='1033' SourceFile='../Release/PxDbModule.msm' DiskId='1' />
                                </Directory>
                        </Directory>
                </Directory>


                <Feature Id="PxDBFeature" Title="Proximex Database"
Level="1" ConfigurableDirectory="INSTALLLOCATION"
TypicalDefault="install" >
                        <MergeRef Id='PxDbModule' />
                </Feature>
                
                <Feature Id="ProximexWebService" Title="Proximex Web
Service" Level="2">
                        <MergeRef Id='PxWSModule' />
                </Feature>


Now when I run the setup and select only PxDbModule it still perform the
actions from PxWSModule (it doesn't seem to copy the files but the
custom actions seem to get triggered
Do I need to add any condition in my custom actions so that they don't
get triggered?

Thanks
Shree



------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users



------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to