我使用 C# 代码创建了一个 Windows 服务,它已安装并显示在服务管理面板中。我当时想删除它。
这是我在 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>
但是,当我刷新服务管理面板时,该服务仍然存在。
这意味着它根本没有被删除。谢谢你的建议。