Ok, I implemented it via a C# Custom action. Just a handful of lines... I also thought about extending the PermissionEx element by adding a Condition property. I briefly looked at the WIX source and it doesn't look that hard. Much harder is getting the WIX source to build. Is there any documentation on this? I only need to compile the WixUtil extension, not the whole thing.
@Rob: Do you see this extension as a probably feature for WIX? If I get the build process to work, I could implement the feature and create a pull request from it. Kind regards, Henning > -----Original Message----- > From: Blair Murri [mailto:os...@live.com] > Sent: Mittwoch, 3. Juli 2013 10:20 > To: General discussion for Windows Installer XML toolset. > Subject: Re: [WiX-users] Condition on service permissions > > Unfortunately, no. > > > From: m...@henningkrause.eu > > To: wix-users@lists.sourceforge.net > > Date: Tue, 2 Jul 2013 15:37:52 +0000 > > Subject: Re: [WiX-users] Condition on service permissions > > > > Ok, an immediate custom action would do the trick. > > > > Is there anything out-of-the-box that I missed? I'd really like to avoid > > custom actions if I can... > > > > Kind regards, > > Henning Krause > > > > > -----Original Message----- > > > From: Blair Murri [mailto:os...@live.com] > > > Sent: Dienstag, 2. Juli 2013 17:28 > > > To: General discussion for Windows Installer XML toolset. > > > Subject: Re: [WiX-users] Condition on service permissions > > > > > > http://www.joyofsetup.com/2007/07/01/semi-custom-actions/ > > > > > > > From: m...@henningkrause.eu > > > > To: wix-users@lists.sourceforge.net > > > > Date: Tue, 2 Jul 2013 13:32:26 +0000 > > > > Subject: [WiX-users] Condition on service permissions > > > > > > > > Hi all, > > > > > > > > I have a setup which installs three services: > > > > > > > > ServiceA, ServiceB and ManagementService. > > > > > > > > ServiceA and ServiceB are in different features but have a dependency > on > > > ManagementService, which lives in its own feature. > > > > > > > > SerivceA and ServiceB should be able to start/stop the > > > ManagementService. > > > > > > > > So I use this snippet to install the service: > > > > > > > > <Component Id="ManagementService" Guid="... "> > > > > <File Source="PathToFile" KeyPath="yes" /> > > > > <ServiceInstall Account="LOCALSYSTEM" Id="ManagementService" > > > DisplayName="ManagementService" Name="ManagementService " > > > Start="demand" Type="ownProcess" Description="..."> > > > > <PermissionEx > > > xmlns="http://schemas.microsoft.com/wix/UtilExtension" > > > User="[SERVICEAPERMISSIONACCOUNT]" ServiceQueryStatus="yes" > > > ServiceStart="yes" ServiceStop="yes" /> > > > > <PermissionEx > > > xmlns="http://schemas.microsoft.com/wix/UtilExtension" > > > User="[SERVICEBPERMISSIONACCOUNT]" ServiceQueryStatus="yes" > > > ServiceStart="yes" ServiceStop="yes" /> > > > > </ServiceInstall> > > > > <ServiceControl Id="ManagementServiceControl " > > > Name="ManagementService" Remove="uninstall" Stop="both" > Wait="no" > > > /> > > > > </Component> > > > > > > > > Both services use service sids in the form "NT Service\ServiceName". > > > > > > > > If I install both features, all is well and the setup succeeds. But if I > > don't > > > install ServiceB, the setup fails, because the > SERVICEBPERMISSIONACCOUNT > > > resolves to a principal which does not exist. So I need to put a condition > > on > > > the PermissionEx tag. Unfortunately, the PermissionEx can only be put on > a > > > ServiceInstall element. > > > > > > > > What would be the correct way to solve this? I didn't find anything on > > > Google about this. > > > > > > > > Kind regards, > > > > Henning > > > > > > > > > > ---------------------------------------------------------------------------- > > -- > > > > This SF.net email is sponsored by Windows: > > > > > > > > Build for Windows Store. > > > > > > > > http://p.sf.net/sfu/windows-dev2dev > > > > _______________________________________________ > > > > WiX-users mailing list > > > > WiX-users@lists.sourceforge.net > > > > https://lists.sourceforge.net/lists/listinfo/wix-users > > > > > > > > ---------------------------------------------------------------------------- > > -- > > > This SF.net email is sponsored by Windows: > > > > > > Build for Windows Store. > > > > > > http://p.sf.net/sfu/windows-dev2dev > > > _______________________________________________ > > > WiX-users mailing list > > > WiX-users@lists.sourceforge.net > > > https://lists.sourceforge.net/lists/listinfo/wix-users > > > > ---------------------------------------------------------------------------- -- > > This SF.net email is sponsored by Windows: > > > > Build for Windows Store. > > > > http://p.sf.net/sfu/windows-dev2dev > > _______________________________________________ > > WiX-users mailing list > > WiX-users@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/wix-users > > ---------------------------------------------------------------------------- -- > This SF.net email is sponsored by Windows: > > Build for Windows Store. > > http://p.sf.net/sfu/windows-dev2dev > _______________________________________________ > WiX-users mailing list > WiX-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ This SF.net email is sponsored by Windows: Build for Windows Store. http://p.sf.net/sfu/windows-dev2dev _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users