我有C#编写的,我需要安装和调试的自定义Windows服务。当我使用installutil与Windows服务安装,然后立即卸载定制窗口服务
installutil "[path].exe"
在命令行,然后尝试与搜索服务,它不会出现在任何地方安装的服务列表。纵观安装日志文件,我看到:
Installing assembly 'myservice'.
Affected parameters are:
logtoconsole =
assemblypath = mypath
logfile = mylogfile
Installing service MyService
Service MyService has been successfully installed.
Creating EventLog source MyService in log Application...
Committing assembly 'myservice'.
Affected parameters are:
logtoconsole =
assemblypath = myservice
logfile = pathtoinstalllog
Uninstalling assembly myservice
Affected parameters are:
logtoconsole =
assemblypath = myservice
logfile = pathtoinstalllog
Removing EventLog source myservice.
Service myservice is being removed from the system...
Service myservice was successfully removed from the system.
Uninstalling assembly myservice'.
Affected parameters are:
logtoconsole =
assemblypath = myservice
logfile = pathtoinstalllog
Removing EventLog source myservice.
Service myservice is being removed from the system...
Service myservice was successfully removed from the system.
(名称路径,为MyService,pathtoinstalllog等到位公司具体情况)
无论如何,从日志文件时,它看起来好像服务正在安装,然后立即卸载......
如果需要更多的代码或信息,让我知道,在此先感谢。
Should't您可以指定标志'-i'把这件事告诉'install'? – Suhas
你在日志文件中得到任何错误?这是来自installlog文件的完整日志。同时检查我们的代码不会导致卸载 –
哦,我认为这是默认值..无论哪种方式,它并没有改变任何东西:\ –