If the action is sequenced before InstallFinalize it must be deferred or it will run before the files are actually written to disk or the service is actually created (since both of those happen in the script).
If it is set to run without impersonation (a setting which is only applicable for non-immediate actions) then it can run with administrative privileges, something you cannot do with an action scheduled after InstallFinalize. A very frequent cause of failure to start a service is not enough privilege, and that simply increases the chances of success. Deferred actions can be set to have their result code ignored, just as immediate ones can, so you don't lose your successful installation just because you are trying to eliminate wasted effort. -----Original Message----- From: Elfe Xu [mailto:elf...@microsoft.com] Sent: Thursday, July 01, 2010 7:59 PM To: wix-users@lists.sourceforge.net Subject: Re: [WiX-users] <ServiceInstall> and <ServiceControl> question Hi Blair, Would you please help me to understand why I need to make the CA as deferred without impersonation? Since I want the install to success no matter whether the service started successfully or failed, I just run StartMyService CA after InstallFinalize. Do you see any problem of doing so? Thanks, -Elfe -- View this message in context: http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/ServiceInstall -and-ServiceControl-question-tp3814416p5246178.html Sent from the wix-users mailing list archive at Nabble.com. ---------------------------------------------------------------------------- -- This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users