I think the usual solution is to add two components, both containing the file, and one of the components installs it as a service, the two components having mutually exclusive install conditions.
Phil Wilson -----Original Message----- From: Andreas Hirth [mailto:a.hi...@luratech.com] Sent: Monday, May 17, 2010 8:59 AM To: wix-users@lists.sourceforge.net Subject: [WiX-users] Conditionally install executable as service Hi all, I struggle with writing a WiX installer that can conditionally install an executable as Windows service. The executable can be run as Windows service but it is not required to. The user should get an option to install the service during setup or not. The option could be in form of a feature "Install as Windows Service". I'm stuck because the ServiceInstall element has no condition and always refers to the KeyPath file of its Component. My last attempt was to have two Components installing the same file, one with ServiceInstall, the other without. But besides not being a very elegant approach it's not working (ICE30). Is there any solution out there you know of or would the only way to write my own custom action for this? Any help would be appreciated. Thanks! Andreas ------------------------------------------------------------------------------ _______________________________________________ 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 Portland House, Bressenden Place, London, SW1E 5BF (Registered number 166023). For a list of European legal entities within the Invensys Group, please go to http://www.invensys.com/legal/default.asp?top_nav_id=77&nav_id=80&prev_id=77. You may contact Invensys plc on +44 (0)20 7821 3848 or e-mail inet.hqhelpd...@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). ------------------------------------------------------------------------------ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users