Мы обязаны давать полномочия пользователя Запуститься, Остановиться, и состояние Query установленной службы.
В WiX 2.0 работал бы этот xml:
<ServiceInstall
Id="ServiceInstaller" Type="ownProcess"
Name="$(var.ServiceName)" DisplayName="$(var.ServiceName)" Description="Our service description"
Start="demand" Account="LocalSystem" ErrorControl="ignore" Interactive="no">
<Permission User="Everyone" ServiceQueryStatus="yes" ServiceStart="yes" ServiceStop="yes" />
</ServiceInstall>
<ServiceControl Id="StopService" Stop="both" Remove="uninstall" Name="$(var.OmniVpnServiceName)" Wait="yes" />
Мы используем WiX 3.0, и они удалили Сервис* атрибуты от элемента Разрешения, и больше не позволяйте ему быть ребенком элемента ServiceInstall.
Как мы получаем тот же эффект в WiX 3.0?
Как обзор, нам нужно:
Установите сервис с:
Предоставьте "Всем" пользовательский доступ к:
На установленной службе.
Документация говорит использовать это внутри элемента ServiceInstall:
<util:PermissionEx
User="Everyone"
GenericAll="yes"
ServiceChangeConfig="yes"
ServiceEnumerateDependents="yes"
ChangePermission="yes"
ServiceInterrogate="yes"
ServicePauseContinue="yes"
ServiceQueryConfig="yes"
ServiceQueryStatus="yes"
ServiceStart="yes"
ServiceStop="yes" />
Я не пробовал
пространство имен util - xmlns:util="http://schemas.microsoft.com/wix/UtilExtension"