0
Windowsサービス用のインストーラがあります。要件に応じて、これらのすべてが指定されている場合は、そのユーザーアカウントでサービスをインストールし、インストール後にローカルシステムでサービスを実行する必要があります。ユーザ名とパスワードが与えられた場合、wixでサービスアカウントの条件を設定します。
どのようにアカウントを条件に基づいて設定しますか?
<Component Id="CMPFa85281c3_a329_4a93_a1d7_203fbccec31f" Guid="*" Directory="INSTALLLOCATION">
<Condition>
<![CDATA[Installed OR (SVCINSTALL <> 0)]]>
</Condition>
<RemoveFile Id="RmFa85281c3_a329_4a93_a1d7_203fbccec31f" Name="MyService.exe" On="both" />
<File Id="Fa85281c3_a329_4a93_a1d7_203fbccec31f" Source="$(var.BaseDir)\MyService.exe" KeyPath="yes" />
<ServiceInstall Id="InstallWindowsService" Name="$(var.SvcName)"
DisplayName="$(var.SvcDisplayName)"
Start="auto"
ErrorControl="normal"
Type="ownProcess"
Account="LocalSystem"
Description="$(var.SvcDescription)"/>
<ServiceControl Id="sc_InstallWindowsService" Name="$(var.SvcName)" Start="install" Remove="uninstall" Stop="both" Wait="no"/>
</Component>