2013-10-02 4 views
0

Я создал службу Windows с использованием кода C#, она была установлена ​​и показана на панели управления службами. Тогда я хотел удалить его.Удаление службы Windows в Windows 7

Вот моя команда в командной строке Developer для VS 2012

c:\source\MessagingPlatform\2013Q4\MessagingCFE\ServiceHost\bin\Debug>installuti 
l /u ServiceHost.exe 
Microsoft (R) .NET Framework Installation utility Version 4.0.30319.17929 
Copyright (C) Microsoft Corporation. All rights reserved. 



    The uninstall is beginning. 
    See the contents of the log file for the c:\source\MessagingPlatform\2013Q4\Mess 
    agingCFE\ServiceHost\bin\Debug\ServiceHost.exe assembly's progress. 
    The file is located at c:\source\MessagingPlatform\2013Q4\MessagingCFE\ServiceHo 
    st\bin\Debug\ServiceHost.InstallLog. 
    Uninstalling assembly 'c:\source\MessagingPlatform\2013Q4\MessagingCFE\ServiceHo 
    st\bin\Debug\ServiceHost.exe'. 
    Affected parameters are: 
    logtoconsole = 
    logfile = c:\source\MessagingPlatform\2013Q4\MessagingCFE\ServiceHost\bin\Deb 
    ug\ServiceHost.InstallLog 
    assemblypath = c:\source\MessagingPlatform\2013Q4\MessagingCFE\ServiceHost\bi 
    n\Debug\ServiceHost.exe 
    No public installers with the RunInstallerAttribute.Yes attribute could be found 
    in the c:\source\MessagingPlatform\2013Q4\MessagingCFE\ServiceHost\bin\Debug\Se 
    rviceHost.exe assembly. 

    The uninstall has completed. 

    c:\source\MessagingPlatform\2013Q4\MessagingCFE\ServiceHost\bin\Debug> 

Однако, когда я обновилась панель управления услугами, служба по-прежнему существует.

Это означает, что это не было удалено вообще. Спасибо за совет.

ответ

0

Используйте СЦ утилиту командной строки:

sc delete <servicename> 

Убедитесь, что использовать фактическое имя службы здесь, а не отображаемое имя.

Однако иногда службы не могут быть удалены без перезагрузки. Затем он помечен как «отключен».

Смежные вопросы