C# 我的服务无法卸载
我最近试图更改我的windows服务的显示名称,但显然我弄糟了。旧版本无法完全卸载,我无法安装新版本的windows服务。这是运行installutil/i myService时生成的错误:C# 我的服务无法卸载,c#,visual-studio-2008,windows-services,C#,Visual Studio 2008,Windows Services,我最近试图更改我的windows服务的显示名称,但显然我弄糟了。旧版本无法完全卸载,我无法安装新版本的windows服务。这是运行installutil/i myService时生成的错误: An exception occurred during the uninstallation of the System.Diagnostics.EventLogInstaller installer. System.InvalidOperationException: The event log sou
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.
因此,事件日志源等于日志名。这意味着什么?我该如何修复它?我自己发现了。帮助。因此,注册表中基本上有3个与windows服务同名的位置。因此,我首先尝试编写一个控制台应用程序来删除事件日志:
System.Diagnostics.EventLog.Delete("7 Ac Service");
它照顾了其中两人。我使用regedit手动删除了最后一个。然后,我的windows服务安装没有问题。可能重复: