jjzjj

m_serviceProcessInstaller

全部标签

c# - 使用 InstallUtil 安装带有启动参数的 Windows 服务

我正在使用InstallUtil安装我的服务,但我不知道如何为其指定启动参数!这是我的Installer子类:[RunInstaller(true)]publicclassServerHostInstaller:Installer{privateServiceInstallerm_serviceInstaller;privateServiceProcessInstallerm_serviceProcessInstaller;privatestaticstrings_usage="Usage:\ninstallutil/i/username=/password=NCStub.Server

windows - "Installation failed due to the absence of a ServiceProcessInstaller"问题

当我开始使用installutil安装时出现以下错误,我已经设置了ServiceInstaller和ServiceInstallerProcess,System.InvalidOperationException:InstallationfailedduetotheabsenceofaServiceProcessInstaller.TheServiceProcessInstallermusteitherbethecontaininginstaller,oritmustbepresentintheInstallerscollectiononthesameinstallerastheSer

c# - ServiceProcessInstaller 和 ServiceInstaller 的区别

我不明白System.ServiceProcess.ServiceProcessInstaller和System.ServiceProcess.ServiceInstaller之间的区别。来自元数据:第一个安装可执行文件,第二个安装类。在阅读了MSDN的示例之后,其中有一个ServiceProcessInstaller和两个具有不同ServiceName的ServiceInstaller(s),我完全迷路了。有明确的解释吗? 最佳答案 一个可执行文件实际上可能包含多个服务。在这种情况下,您将有一个代表每个服务的ServiceInst