Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 232
San Avatar asked Jan 20 '11 03:01

San


People also ask

What is Windows Deployment Services and how it works?

Windows Deployment Services is a server role that gives administrators the ability to deploy Windows operating systems remotely. WDS can be used for network-based installations to set up new computers so administrators do not have to directly install each operating system (OS).

How do I start Windows Deployment Services?

Select Start, select Run, type wdsmgmt. msc, and then press OK. In the Windows Deployment Services window, expand Servers, right-click the WDS server name, and then select Properties. In the Server Properties dialog box, select the DHCP tab.

How do you deploy a windows service to a production server?

Answers. You can add a installer class to your project, and the add your project outputs to a setup project, then you can use this installer install your windows service. For more details you can look into the steps in the MSDN document.


1 Answers

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

like image 85
David Avatar answered Sep 27 '22 23:09

David