1. There are several issues that are resolved by using DTF to run managed code custom actions, among which is a problem whereby if a custom action instance of msiexec loads the managed runtime and is reused for a different action, it can't load a different version of the runtime (if needed). By calling out to an out-of-process and using a pipe to provide all the advantages of in-process you prevent that problem while also preventing the issues with out-of-process (aka EXE) CAs. It is the current recommended best practice.
2. Yes, you should put your CA in the binary table. Using assemblies you install leads to several of the evils of self-registration. If you use DTF, you can package multiple assemblies in the same CA "DLL", so you should be able to design a system whereby you don't have to ever depend on anything except the .NET framework you built against. 3. See the DTF.chm file in your WiX installation's doc folder. [CustomAction] public static ActionResult SampleCustomAction1(Session session) { session.Log("Hello from SampleCA1"); session["PROPERTYINEED"] = "My property's value"; if(1 == 1) { return ActionResult.Success; } else return ActionResult.Failure; } -----Original Message----- From: Dave Kolb [mailto:d...@dotnetcodeslingers.com] Sent: Saturday, October 10, 2009 4:17 PM To: 'General discussion for Windows Installer XML toolset.' Subject: Re: [WiX-users] Which way to install a Windows service is best? I did find this http://blog.torresdal.net/2008/10/24/WiXAndDTFUsingACustomActionToListAvaila bleWebSitesOnIIS.aspx so think that will suffice for an example to get started. Any others appreciated though. Apparently DTF supplies the conventional .dll wrapper msi needs to call managed code. Needs to talk to out of process .NET through a pipe though huh? Interesting! - Dave -----Original Message----- From: Dave Kolb [mailto:d...@dotnetcodeslingers.com] Sent: Saturday, October 10, 2009 6:35 PM To: 'General discussion for Windows Installer XML toolset.' Subject: RE: [WiX-users] Which way to install a Windows service is best? Thanks Blair. I will have a go at using <ServiceInstall> and running a prior CA to set properties for it and will avoid any evil self install patterns. I am confused on how DTF fits into the picture though. 1. Is DTF necessary to run a custom action built with C# managed code? 2. Must I supply my CA with the <binary> element since you suggest I should not depend on any files installed yet or can I use one of the assemblies being installed? 3. Any example of using DTF to build a managed code CA setting a property that can be used by an element? I've been searching and will continue to do so but have not really found anything yet. Thanks again, neat stuff! Dave -----Original Message----- From: Blair [mailto:os...@live.com] Sent: Saturday, October 10, 2009 5:46 PM To: 'General discussion for Windows Installer XML toolset.' Subject: Re: [WiX-users] Which way to install a Windows service is best? If I were you I would use option 4. I would write an immediate CA that retrieves and decrypts the account and password that I would schedule in InstallExecuteSequence running sometime before the InstallServices action (I would probably sequence it before CostInitialize, but that is just me). That CA you write you should write using DTF if you need to use managed code. Don't depend on a file you are installing being present in that CA and don't depend on anything you will be adding to the GAC, which means you may need to copy your code OR add assemblies to your CA to be used "locally" as described in the DTF documentation for creating custom actions. Each of your other options (including the second part of option 4) are all forms of "self-registration" which are considered evil when it comes to reliably being able to perform upgrades, repairs, rollbacks, removals, etc. Please don't do them: self-registration is probably the MOST frequent cause of MSI errors globally. Professional deployment engineers tend to hate the VS-supplied deployment solutions because they produce fragile installation packages that cause more maintenance headaches than the generally solve. They are NOT a good example to follow. ---------------------------------------------------------------------------- -- Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users