我最近试图更改我的Windows服务的显示名称,但显然我搞砸了。旧版本无法完全卸载,我无法安装新版本的Windows服务。这是运行installutil / i myService时产生的错误:
An exception occurred during the uninstallation of the System.Diagnostics.EventLogInstaller installer.
System.InvalidOperationException: The event log source '7 Ac Service' cannot be deleted, because it's equal to the log name.
An exception occurred while uninstalling. This exception will be ignored and the uninstall will continue. However, the application might not be fully uninstalled after the uninstall is complete.
因此事件日志源等于日志名称。这是什么意思,我该如何解决?
答案 0 :(得分:8)
我发现了自己。 This post有所帮助。因此,注册表中基本上有3个位置与Windows服务同名。所以我首先尝试编写一个控制台应用程序来删除事件日志:
System.Diagnostics.EventLog.Delete("7 Ac Service");
它照顾了其中的2个。我使用regedit手动删除了最后一个。然后我的Windows服务安装没有问题。