Why reinvent the wheel? MSI can handle starting a service for you. Create a ServiceControl record and tie it to a component and put the condition on the component. This way your CA doesn't have to worry about starting the service, it'll get taken care of when StartServices runs.
---------------------------------------- From: "George Fleming" <gef...@microsoft.com> Sent: Wednesday, May 08, 2013 2:08 PM To: "wix-users@lists.sourceforge.net" <wix-users@lists.sourceforge.net> Subject: [WiX-users] Change impersonation from within a Custom Action I have a deferred custom action that has Impersonate set to "yes" to execute some SQL commands. Conditionally, it also needs to start a Windows Service. Windows service fails to start because impersonate of "yes" lacks sufficient privileges. Is there any way to change the impersonation within the custom action? An alternative is to split the custom action into two, one with impersonate of "yes", and one with impersonate of "no", but that requires passing data between the two deferred CA's, which isn't easy. ---------------------------------------------------------------------------- -- Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. This 200-page book is written by three acclaimed leaders in the field. The early access version is available now. Download your free book today! http://p.sf.net/sfu/neotech_d2d_may _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. This 200-page book is written by three acclaimed leaders in the field. The early access version is available now. Download your free book today! http://p.sf.net/sfu/neotech_d2d_may _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users