【问题标题】:error 1001. the specified service already exists错误 1001. 指定的服务已经存在
【发布时间】:2011-12-05 19:42:49
【问题描述】:

我正在编写一个 C# windows 服务,我可以在 Visual Studio 中安装和卸载,但我不确定我在代码中做了什么并且把事情搞砸了。现在当我尝试安装时,我收到错误 1001:

The specified service already exists.

但是当我尝试卸载时,它给了我:

Another program is being installed. Please wait until that installation is complete, and then try installing this software again.  

我确实看到我的服务仍在服务中列出。我应该怎么做才能解决这个问题?

【问题讨论】:

    标签: service windows-services installation


    【解决方案1】:

    sc delete [服务名称] 对我有用。请务必以管理员身份打开cmd,否则会出现拒绝访问错误。

    【讨论】:

    • 天哪,谢谢!一个小提示,如果你的服务名称中有空格,你必须使用 sc delete "My service name"
    猜你喜欢
    • 2013-01-04
    • 2012-04-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-05-13
    • 1970-01-01
    • 1970-01-01
    • 2016-11-08
    相关资源
    最近更新 更多