错误1001:指定的服务已经存在。无法删除现有服务 [英] Error 1001: The Specified Service Already Exists. Cannot remove existing service

查看:1688
本文介绍了错误1001:指定的服务已经存在。无法删除现有服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个服务。我安装了它前一阵子。我需要做一个更新的服务。我去添加/删除程序,寻找我的服务,并没有安装在那里。我看着services.msc,然后它就在那里,停了下来。我能够启动和停止它。我跑在命令提示符下以管理员身份跑资深大律师删除[服务名称],并收到指定的服务不存在作为安装服务。我的确在命令提示符SC查询,它没有回来。我右键点击安装,点击卸载,并收到此操作仅对当前安装的产品。我试图修补为好,并得到了相同的信息。

I have a service. I installed it a while ago. I need to do an update to the service. I went to the Add/Remove Programs and looked for my service, and it is not installed there. I looked at services.msc and it is there, stopped. I was able to start it and stop it. I ran a command prompt as administrator and ran sc delete [Service Name], and recieved "The specified service does not exist as an installed service." I did a sc query in the command prompt, and it is not returned. I right clicked on the installer, clicked on uninstall and recieved "This action is only valid for products that are currently installed." I tried repair as well, and got the same message.

我已经重新启动机器了几次,没有运气得到这个服务进行卸载。我使用与Visual Studio安装的基本设置项目模板。我试着改变程序的名称,并增加了版本号。

I have restarted the machine a few times, and no luck getting this service to uninstall. I'm using the basic Setup Project template installed with Visual Studio. I've tried changing the name of the program, and increasing the version number.

如何卸载,显然存在,避免这种情况发生在未来的服务?

How do I uninstall the service that apparently exists, and prevent this happening in the future?

推荐答案

如果您有包括服务安装程序使用 InstallUtil.exe / U< .exe文件; process.exe>
InstallUtil.exe在 \Windows\Microsoft.Net\Framework\v4.0.30319 被发现

If you have the .exe that includes the service installer use InstallUtil.exe /u <process.exe> InstallUtil.exe is found in \Windows\Microsoft.Net\Framework\v4.0.30319

在安装项目,包括在所有的自定义操作为您服务,也卸载

In the setup project, include your service in all custom actions, also the uninstall

(右键点击该项目自定义操作)

(right click on the project, Custom Action)

心连心

马里奥

这篇关于错误1001:指定的服务已经存在。无法删除现有服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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