San
San

Reputation: 83

Windows Service Deployment

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?

Upvotes: 8

Views: 21523

Answers (2)

David
David

Reputation: 73564

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

Upvotes: 9

RRUZ
RRUZ

Reputation: 136391

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

Upvotes: 2

Related Questions