Installing/Uninstalling Services in Windows 7: “Error 1001. The specified service has been marked for deletion”

前端 未结 5 1520
广开言路
广开言路 2021-02-03 23:26

I am currently developing a Windows Service in .NET 4.0, Visual Studio 2010, Windows 7-32bit. I have an installer project that does the installation for me. When I install the s

相关标签:
5条回答
  • 2021-02-04 00:04

    Have you considered using a different MSI authoring tool such as Windows Installer XML? The advantage is it doesn't hide Windows Installer's underlying ServiceInstall / ServiceControl panels saving you from the pain of reinventing the wheel with fragile out of process InstallUtil code.

    0 讨论(0)
  • 2021-02-04 00:04

    I had the same issue with my windows service on my deployment server.

    Steps to solve problem:

    • Go to install/uninstall wizard in windows
    • Click on repair (which will fire custom action of setup)
    • After repair try to uninstall that windows service
    • it will uninstall perfectly

    Hope this will work for you.

    0 讨论(0)
  • 2021-02-04 00:09

    I was facing the same problem on Windows 7 Ultimate edition. Installing the service after closing the Services.msc window solved my problem.

    0 讨论(0)
  • 2021-02-04 00:11

    I just solved this problem myself, in Windows 7.

    FWIW, turns out you can go to the "Services" tab, right-click on the offending service, choose "Go To Process", and kill as required.

    0 讨论(0)
  • 2021-02-04 00:17

    Short Answer

    • Close Services.msc
    • Close Process Explorer

    Long Answer

    After running into this problem again, I went to task manager and started shutting down processes. I eventually found the culprit, it was an internal corporate application used for managing software distribution. I shut it down, and the services were finally gone.

    Update

    I also found that sometimes Process Explorer needs to be closed for deleted services to disappear.

    0 讨论(0)
提交回复
热议问题