Windows Service Deployment

有些话、适合烂在心里 提交于 2019-12-21 12:17:28

问题


I am currently deploying my windows services manually on the server.

One time Steps:

  1. Install Location on server hosting windows server -> D:\InstallDir
  2. Copied windows Service related files into this folder
  3. Created a batch file to Install Windows Service (InstallUtil.Exe) and another batch file to uninstall windows service and copied in the install folder
  4. Installed windows service using the install batch file

Here are the steps I perform to upgrade:

  1. Take backup of existing Install folder (to use in case I need to rollback to prev version)
  2. Run uninstall batch file to uninstall the windows service (InstallUtil /u)
  3. Copy new DLLs from a location on build server into Install Folder (on server hosting windows services)
  4. Run install batch file to Install the windows service (InstallUtil WIndowsService.Exe)

I would like to automate upgrade steps; can you suggest deployment strategy in this scenario?


回答1:


There's a walk through for setting up a Setup Project for a Windows Service. I've used it and it's simple to use and simple to create. It creates a standard .msi file to install from. Since it's a standard Setup project creating a standard msi, you can set it to automatically uninstall previous versions, etc.

http://support.microsoft.com/kb/317421




回答2:


You can use an installer like Inno-setup, check this related question using inno-setup Inno Setup for Windows service.



来源:https://stackoverflow.com/questions/4743064/windows-service-deployment

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!