无法卸载 Windows 服务:“...无法删除,因为它等于日志名称." [英] cannot uninstall a windows service: "...cannot be deleted, because it's equal to the log name."

查看:32
本文介绍了无法卸载 Windows 服务:“...无法删除,因为它等于日志名称."的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要卸载我创建的 Windows 服务,但使用 Windows 中的卸载或更改程序"程序时出现此错误:

I need to uninstall a Windows Service I have created, but I get this error using the "Uninstall or change program" program in windows:

错误.发生异常时正在卸载.这个例外将是被忽略,卸载将继续.然而,申请之后可能无法完全卸载卸载完成.-> 的事件日志源111 我的服务"不能删除,因为它是平等的到日志名称.

Error. 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. -> The event log source '111 My Service' cannot be deleted, because it's equal to the log name.

然后我单击确定",该程序仍列在已安装程序列表中.更糟糕的是,我无法安装它的新版本.Windows 安装程序说已经安装了该产品的另一个版本,我应该先卸载它.我如何摆脱这个程序?

Then I click "OK" and the program remains listed in the list of installed programs. What is worse, I cannot install a new version of it. The windows installer says that another version of this product is already installed and I should uninstall it first. How do I get rid of this program?

更新这是我在其上运行 InstallUtil.exe/u 命令时发生的情况.

Update Here is what is happening when I run InstallUtil.exe /u command on it.

卸载开始.见日志文件的内容C:\MyService.MyService.大会的进展.文件位于C:\MyService.MyService.InstallLog.卸载组件'C:\MyService.MyService.exe'.做作的参数为:logtoconsole =
程序集路径 = C:\MyService.exe
日志文件 =C:\MyService.MyService.InstallLog删除事件日志源 111 我的服务.期间发生异常的卸载System.Diagnostics.EventLogInstaller安装程序.System.InvalidOperationException:事件日志源111 我的服务"不能删除,因为它是平等的到日志名称.发生异常卸载时.这个异常将被忽略,卸载将继续.然而,申请可能没有完全卸载 l 是完成.

The uninstall is beginning. See the contents of the log file for the C:\MyService.MyService. assembly's progress. The file is located at C:\MyService.MyService.InstallLog. Uninstalling assembly 'C:\MyService.MyService.exe'. Affected parameters are: logtoconsole =
assemblypath = C:\MyService.exe
logfile = C:\MyService.MyService.InstallLog Removing EventLog source 111 My Service. An exception occurred during the uninstallation of the System.Diagnostics.EventLogInstaller installer. System.InvalidOperationException: The event log source '111 My 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 uninstalle l is complete.

卸载已完成.一个卸载时发生异常.此异常将被忽略,并且卸载将继续.然而应用程序可能不完全卸载完成.

The uninstall has completed. An exception occurred while uninstalling. This exception will be ignored and the uninstall will continue. However, the application might not be fully uninstalle l is complete.

推荐答案

尝试在cmd中执行下一条命令:

Try to execute next command in cmd:

C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\InstallUtil.exe /u "c:\myservice.exe"

第二个选项是:

sc delete <service name>

运行上面的行后,您可以尝试删除 HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services 中的服务分支.

After running the line above you can try to remove the service branch as well in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services.

这篇关于无法卸载 Windows 服务:“...无法删除,因为它等于日志名称."的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆