简体   繁体   English

无法卸载Windows服务

[英]Unable to Uninstall a Windows Service

I am trying to uninstall a older version of windows service in my machine and install a latest version. 我正在尝试在计算机上卸载Windows服务的旧版本并安装最新版本。 But when I uninstall using InstallUtil.exe /u command,I got following exception "The uninstall has completed. An exception occurred while uninstalling. This exception will be ignored and the uninstall will continue. However, the application might not be fully uninstalled after the uninstall is complete." 但是,当我使用InstallUtil.exe /u命令卸载时,出现以下异常“卸载已完成。卸载时发生异常。此异常将被忽略,卸载将继续。但是,应用程序可能在卸载后无法完全卸载。卸载完成。”

After this when I try to install to the latest version, I got this exception "An exception occurred during the Install phase. System.ComponentModel.Win32Exception: The specified service has been marked for deletion". 此后,当我尝试安装到最新版本时,出现了此异常“安装阶段发生异常。System.ComponentModel.Win32Exception:指定的服务已标记为删除”。

I even tried to delete the service with SC delete command. 我什至尝试使用SC delete命令删除服务。 I get "The specified service has been marked for deletion" exception again. 我再次收到“指定的服务已被标记为删除”的异常。 I also tried to delete the service manually from REGEDIT. 我还尝试从REGEDIT手动删除服务。 But still couldn't install the service... I even tried to restart the machine. 但是仍然无法安装服务...我什至尝试重新启动计算机。 can someone help me with this??? 有人可以帮我弄这个吗???

I did face this issue, I followed the below steps, hope they work for you. 我确实遇到了这个问题,我按照以下步骤操作,希望它们对您有用。

  1. Restart the system. 重新启动系统。
  2. In services.msc, stop the service and set it to disabled. 在services.msc中,停止该服务并将其设置为Disabled。
  3. Restart the system, boot in safe mode and uninstall the service. 重新启动系统,以安全模式启动并卸载服务。

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

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