Windows服务:指定的服务已存在 [英] Windows Service: Specified Service Already Exists

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

问题描述

在尝试安装用C#编写的Windows服务时,我一直收到此错误.我已经多次卸载并安装了此服务,但直到最近一次它似乎才中断.

I keep getting this error when trying to install this windows service, written in C#. I have uninstalled and installed this service many times, and only this last time has it seemed to break.

查看管理员设置"->服务窗口中,我仍然看到我的服务.它无法启动,否则我看不到将其删除的方法.

Looking in the Admin Settings --> Service window, I still see my service. It can't start and I see no way to remove it otherwise.

发生了什么事,我该如何解决?我在正在使用的Deployment包的重写Installation类中找到了有关使用Win32API测试和删除服务的建议,但找不到Microsoft.Win32下描述的任何此类方法.

What happened, and how can I fix this? I have found suggestions on using Win32API to test for and remove the service, in the overridden Installation class for the Deployment package I'm using, but cannot find any such methods described under Microsoft.Win32.

推荐答案

您是否尝试过重启计算机?

have you tried rebooting the machine?

有时,当多次安装/卸载服务时,Windows会卸载它而不是将其标记为删除",而不是将其卸载.并且在计算机重新启动后您将无法卸载或启动它.

Sometimes when installing/uninstallng a service many times, Windows instead of uninstalling it it will "mark it as deletion" and you won't be able to uninstall or starting it after a machine reboot.


这篇关于Windows服务:指定的服务已存在的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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