いくつかのパフォーマンスカウンターがあるNTサービスがあります。installutilを使用してサービスをデプロイすると、perfカウンターとサービスが正常にインストールされます。ServiceInstallを使用するmsiを使用してデプロイすると、サービスは表示されますが、パフォーマンスカウンターがインストールされません。
私はいつも、ServiceInstallが内部でinstallutilを実行していると思っていました。パフォーマンスカウンターのインストールを妨げる重大な違いはありますか?
Wixセグメント
<ServiceInstall Id='ServiceInstall' ErrorControl='ignore' Type='ownProcess' DisplayName='Service' Description='service' Name='Service' Start='auto' Account='[SERVICEACCOUNT]' Password='[SERVICEACCOUNTPASSWORD]' />
<ServiceControl Id='Service' Remove='uninstall' Name='Service' Start='install' Stop='both' Wait='yes' />
パフォーマンスカウンターのインストール
[RunInstallerAttribute(true)]
[RegistryPermissionAttribute(SecurityAction.LinkDemand, Unrestricted = true)]
[EnvironmentPermissionAttribute(SecurityAction.InheritanceDemand, Unrestricted = true)]
public sealed class CountersInstaller : Installer
{
public CountersInstaller()
{
Installers.AddRange(Counters.Instance.PerformanceCounterInstallers());
}
}