Have you considered instead using a shared component?

--
John Merryweather Cooper
Senior Software Engineer | Enterprise Service Applications | Continuing 
Development
Jack Henry & Associates, Inc.® | Lenexa, KS  66214 | Ext:  431050 
|jocoo...@jackhenry.com



-----Original Message-----
From: psimms [mailto:psi...@tycoint.com] 
Sent: Monday, February 2, 2015 8:58 AM
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] ServiceControl Component - Uninstall condition

Hi all,

I have an installer which is dependent on the main product being installed and 
its services in place, so that when it is installed / uninstalled it can stop 
and start the services.

However if the main product is uninstalled and thus the services removed, the 
installer cannot be uninstalled because the services are no longer there, if 
the installer is being uninstalled with the product in place it needs to stop 
and start the services as well.  Is it possible for a condition to be in place 
to only run the service control component if the services are in place, I have 
been experimenting with conditions and using Transitive="yes" but it always 
runs when trying to uninstall with the main product uninstalled.  I could write 
a custom action to do all this logic for me but I would prefer if possible to 
stick to wix to do this.

Is there anything in wix that could help me with this?

        <Component Id="Control_Service"
                   Guid="{GUID_HERE}"
                   Directory="INSTALLDIR">
            <CreateFolder/>
            <ServiceControl Id="Service"
                            Name="Service_Name"
                            Start="both"
                            Stop="both"
                            Wait="yes"/>
          <Condition>PRODUCT_FOUND&lt;&gt;""</Condition>
        </Component>



--
View this message in context: 
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/ServiceControl-Component-Uninstall-condition-tp7599109.html
Sent from the wix-users mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website, sponsored 
by Intel and developed in partnership with Slashdot Media, is your hub for all 
things parallel software development, from weekly thought leadership blogs to 
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users
NOTICE: This electronic mail message and any files transmitted with it are 
intended
exclusively for the individual or entity to which it is addressed. The message, 
together with any attachment, may contain confidential and/or privileged 
information.
Any unauthorized review, use, printing, saving, copying, disclosure or 
distribution 
is strictly prohibited. If you have received this message in error, please 
immediately advise the sender by reply email and delete all copies.


------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to