简体   繁体   English

Windows 服务卸载

[英]Windows Service uninstall

I tried to uninstall a running windows service written in .net (c#), somehow the service's still existing in services.msc, when I'm trying to install another service with the service name it says an existing service already installed.我试图卸载用 .net (c#) 编写的正在运行的 Windows 服务,不知何故该服务仍然存在于 services.msc 中,当我尝试使用服务名称安装另一个服务时,它说已经安装了现有服务。 I forgot to add uninstall in custom action (using project installer .net).我忘了在自定义操作中添加卸载(使用项目安装程序 .net)。

I tried to delete the service using SC DELETE (service name) in cmd with admin rights.我尝试在具有管理员权限的 cmd 中使用 SC DELETE(服务名称)删除该服务。 Also, delete the service in regedit.exe and in control panel.此外,删除 regedit.exe 和控制面板中的服务。 I also delete the program folder.我也删除了程序文件夹。

Go to your project directory debug folder under bin from the command prompt then type从命令提示符转到 bin 下的项目目录调试文件夹,然后键入

"c:\Windows\Microsoft.NET\Framework64\v4.0.30319\installutil -u servicename.exe"

I solved the problem in this way.我以这种方式解决了这个问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM