Windows 服务没有被卸载
Windows service not getting uninstalled
我想从命令提示符下卸载 Windows 服务,但在出现以下错误时无法正常工作
'installutil' is not recognized as an internal or external command,
operable program or batch file.
这种方式我试过command
D:\backup\WindowsService\WindowsService1\WindowsService1\obj\Debug>installutil -u TestService.exe
D:\backup\WindowsService\WindowsService1\WindowsService1\obj\Debug>installutil -u "TestService.exe"
如何卸载服务?
在您发表评论后,您的问题似乎与 %PATH% 有关。
你的 Windows 上没有 "installutil" 这样的东西。我相信 "installutil" 是你创造的吧?
假设二进制文件位于 C:\Myproject\installutil.exe
有两种执行方式。
第一个:
C:\users\username> cd C:\Myproject
C:\我的项目> .\installutil.exe -u "bla bla bla bla".
第二个:
转到开始菜单并搜索 "environment"。在 "System properties" 下打开 "Edit the system variables"。在 "Advanced" 选项卡中,您会看到 "Environment Variables"。您会看到一个名为 "Path" 的变量。编辑它的值并在末尾添加您自己的 .exe 路径。
当您在命令提示符处执行 "echo %PATH" 时,您应该会看到二进制文件的文件夹。否则,命令提示符将无法找到它。
编辑:
是的,有一个这样的东西叫做 installutil.exe,它可以被开发者命令提示符用于 Visual Studio。
卸载服务的命令:installutil -u "AirwatchService.exe"
您确定您使用的是正确的命令提示符吗?你有这个二进制文件的绝对路径吗?
请检查:https://docs.microsoft.com/en-us/dotnet/framework/tools/installutil-exe-installer-tool
我想从命令提示符下卸载 Windows 服务,但在出现以下错误时无法正常工作
'installutil' is not recognized as an internal or external command, operable program or batch file.
这种方式我试过command
D:\backup\WindowsService\WindowsService1\WindowsService1\obj\Debug>installutil -u TestService.exe
D:\backup\WindowsService\WindowsService1\WindowsService1\obj\Debug>installutil -u "TestService.exe"
如何卸载服务?
在您发表评论后,您的问题似乎与 %PATH% 有关。
你的 Windows 上没有 "installutil" 这样的东西。我相信 "installutil" 是你创造的吧?
假设二进制文件位于 C:\Myproject\installutil.exe
有两种执行方式。
第一个:
C:\users\username> cd C:\Myproject C:\我的项目> .\installutil.exe -u "bla bla bla bla".
第二个:
转到开始菜单并搜索 "environment"。在 "System properties" 下打开 "Edit the system variables"。在 "Advanced" 选项卡中,您会看到 "Environment Variables"。您会看到一个名为 "Path" 的变量。编辑它的值并在末尾添加您自己的 .exe 路径。
当您在命令提示符处执行 "echo %PATH" 时,您应该会看到二进制文件的文件夹。否则,命令提示符将无法找到它。
编辑:
是的,有一个这样的东西叫做 installutil.exe,它可以被开发者命令提示符用于 Visual Studio。
卸载服务的命令:installutil -u "AirwatchService.exe"
您确定您使用的是正确的命令提示符吗?你有这个二进制文件的绝对路径吗?
请检查:https://docs.microsoft.com/en-us/dotnet/framework/tools/installutil-exe-installer-tool