开发者

Updating a windows service

开发者 https://www.devze.com 2023-02-18 11:16 出处:网络
I have an .exe written in .net (VB.net) 2.0.I install it as a service using instalutil.exe. My question is, do I need to fully uninstall the service and re-install it everytime I make an update to th

I have an .exe written in .net (VB.net) 2.0. I install it as a service using instalutil.exe.

My question is, do I need to fully uninstall the service and re-install it everytime I make an update to the exe?

I tried stopping the service and replacing the exe, but it does not seem开发者_运维技巧 to reflect the changes made.


If you stop the service, replace the executable, and restart the service, it will use the new executable.

However, you need to make sure that the executable you're replacing is the one that's actually registered with the system.


You could change the configuration programmatically, via the ChangeServiceConfig API. I've done it, it works. http://msdn.microsoft.com/en-us/library/ms681987%28v=vs.85%29.aspx


This happens to me before, I uninstall the previous one to make the new one work, so i think you really should.

0

精彩评论

暂无评论...
验证码 换一张
取 消