关于卸载windows service后再重新安装遇到的特殊问题

今天早上回来后发现自己写的windows service需要修改调整,就用installutil/u卸载了该服务。等自己修改好后再用installutil进行安装的时候,却总是提示安装失败:The specified service has been marked for deletion.

当然是郁闷啦,不过我还有google,呵呵,就让我在msdn的英文网站上找到了如下解释:

Once you have the post-build event in place, you'll need to keep in mind that every time you build, it will make the installutil calls automatically. Don't leave your services window open when you're building or running installutil or you could get a highly mysterious error: "The specified service has been marked for deletion."

就是说在你运行installutil的时候,不要让计算机管理窗口打开着,否则将出现上述错误。

我就是这个情况,关了管理窗口后,再安装就成功了。以后哪位朋友遇到类似问题可以看看是不是打开了管理窗口。
 

你可能感兴趣的:(windows,service,Google,Build)