更改代码后如何使用 installutil 重新安装 Windows 服务 [英] How to reinstall Windows Service using installutil after making changes in code

查看:25
本文介绍了更改代码后如何使用 installutil 重新安装 Windows 服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我编写了一个测试 Windows 服务并使用 installutil 安装它,运行良好.

I wrote a test Windows service and installed it using installutil which went fine.

在那之后,我对代码进行了更改并尝试再次安装,但出现错误.我是否需要先删除该服务,然后使用 installutil 重新安装?或者有其他方法吗?

After that I made changes in my code and tried to install again but got error. Do I need to remove the service first, then install again using installutil? Or is there other way?

推荐答案

如果可执行文件的名称相同,那么您可以简单地停止 Windows 服务,在旧文件之上复制新文件并启动该服务.

If the name of executable is the same then you can simply stop the Windows service, copy new files on top of the old ones and start the service.

这篇关于更改代码后如何使用 installutil 重新安装 Windows 服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆