【问题标题】:My service failed to uninstall我的服务卸载失败
【发布时间】:2011-07-25 01:34:45
【问题描述】:

我最近尝试更改我的 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.

所以事件日志源等于日志名称。这是什么意思,我该如何解决?

【问题讨论】:

标签: c# visual-studio-2008 windows-services


【解决方案1】:

我发现了自己。 This post 帮助了。所以注册表中基本上有3个地方与windows服务同名。所以我首先尝试编写一个控制台应用程序来删除事件日志:

System.Diagnostics.EventLog.Delete("7 Ac Service");

它照顾了其中 2 个。我使用 regedit 手动删除了最后一个。然后我的 Windows 服务安装没有问题。

【讨论】:

    猜你喜欢
    • 2012-11-12
    • 1970-01-01
    • 2012-11-08
    • 1970-01-01
    • 1970-01-01
    • 2018-02-01
    • 2011-10-25
    • 1970-01-01
    • 2014-03-12
    相关资源
    最近更新 更多