Service already exists (when it clearly doesn't)

前端 未结 4 1623
轮回少年
轮回少年 2020-12-16 11:45

I\'m trying to create an installer for a Windows Service I developed. This installer has a custom UI at one point and it\'s the first time I do something like that so I ins

相关标签:
4条回答
  • 2020-12-16 12:25

    Some time when we install windows service from setup then also problem arises like we can not uninstall. here i will discuss few steps which solve this problem to remove install application entry from Add/Remove panel and again we can install the same application.

    Open registry by Regedit and To locate the program's uninstall key, navigate to the following sub-folder:

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall
    

    select Uninstall icon and start find your program by name. when it will appear then just remove that entry from registry. after remove the program name will not display in Add/Remove. problem will be solved and again user can install the same application. i got this tips from this location http://eugene2k.hubpages.com/hub/How-to-force-uninstall-a-program and i tested and it worked.

    The below steps is for how to remove services when service is not starting or file missing or corrupted.

    1- Open cmd as administrator

    sc delete servicename

    2- open run > regedit , back it up first and then browse to

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services

    and delete the service key

    3- remove the folder where win service was installed

    4- reboot the machine

    0 讨论(0)
  • 2020-12-16 12:30

    http://www.winvistatips.com/windows-service-wont-uninstall-t535569.html

    Have you closed and re-opened the management console? Also restarting your comp might help. Sometimes a service gets marked for uninstall and doesn't really finish until one of the two things listed above happen.

    This has happened to me before and generally one of these two things fixed it.

    0 讨论(0)
  • 2020-12-16 12:38

    Run in command line (adm mode):

    sc delete service_name
    

    Service names with spaces must be quoted.

    Update: Try this:

    sc query type= service > services.txt
    

    and verify that the service does not appear with another name.

    0 讨论(0)
  • 2020-12-16 12:39

    if you try to remove a service when it's still running, it's marked as deleted so you won't see it in the list of services but any attempt to add a service with the same name will fail afterward. the easy solution is to restart. this way windows removes the service before login or you can remove it from Registry in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services

    be careful with that

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