服务已经存在(当它显然不) [英] Service already exists (when it clearly doesn't)

查看:214
本文介绍了服务已经存在(当它显然不)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图创建一个Windows服务我开发了一个安装程序。这种安装有一个自定义的UI在一个点上,这是我第一次做这样的事情,所以我安装和卸载服务几次,以确保一切就像我想在安装程序中。

I'm trying to create an installer for a Windows Service I developed. This installer has a custom UI at one point and it's the first time I do something like that so I installed and uninstalled the service a few times to make sure everything was like I wanted to in the installer.

现在我的问题是,当我尝试安装服务时,出现错误1001:指定的服务已经存在,但该服务被列为无处在注册表中,SERVICES.MSC控制台,或通过 SC查询

Now my issue is that when I try to install the service, it fails with Error 1001: Specified service already exists, but the service is listed nowhere in the registry, the services.msc console, or by sc query.

谁能给我发生了什么,以及如何解决它的线索? 谢谢

Can anyone give me a clue of what's happening and how to fix it? Thank you

编辑:谢谢您的答复。我重新打开了管理控制台,并重新启动计算机,我仍然得到错误。改变产品code和升级code并没有解决任何问题。还有完全没有提及在注册表中的服务

Thanks for your replies. I re-opened the management console and restarted the computer and am still getting the error. Changing the ProductCode and UpgradeCode did not fix the issue either. There's also absolutely no reference to the service in the registry.

推荐答案

在命令行中运行:

sc delete service_name

与Spaces服务名称必须用引号括起来。

Service names with spaces must be quoted.

更新:试试这个:

sc query type= service > services.txt

和验证服务未出现使用其他名称。

and verify that the service does not appear with another name.

这篇关于服务已经存在(当它显然不)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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