How to uninstall a windows service and delete its files without rebooting

后端 未结 10 1910
终归单人心
终归单人心 2021-01-30 16:40

My current project involves deploying an upgraded .exe file that runs as a Windows Service. In order to overwrite the existing .exe with the new version, I currently need to:

10条回答
  •  滥情空心
    2021-01-30 17:07

    If in .net ( I'm not sure if it works for all windows services)

    • Stop the service (THis may be why you're having a problem.)
    • InstallUtil -u [name of executable]
    • Installutil -i [name of executable]
    • Start the service again...

    Unless I'm changing the service's public interface, I often deploy upgraded versions of my services without even unistalling/reinstalling... ALl I do is stop the service, replace the files and restart the service again...

提交回复
热议问题