错误1001.指定的服务已经存在



我正在编写一个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.  

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

sc delete [service name]是为我工作的。请确保以管理员身份打开cmd,否则您将获得访问拒绝错误。

最新更新