Question

I have a windows service that is already installed on a server, and I have a new version of the executable and linked assemblies. The normal procedure I use for installation of a new version is:

  1. Stop the service
  2. Uninstall the service using InstallUtil /u
  3. Overwrite the service executable and linked assemblies with the new ones
  4. Install the service using InstallUtil
  5. Start the service

I'm wondering if I'm doing too much? Is there any problem with just doing the following:

  1. Stop the service
  2. Overwrite the service executable and linked assemblies with the new ones
  3. Start the service

I don't think that uninstalling/installing is necessary but couldn't find any formal confirmation.

Was it helpful?

Solution

If the service has already been installed, yes, you can xcopy deploy your new executable and assemblies without any problems.

All installutil is doing is creating the appropriate registry entries that point to the service executable. If you've previously ran installutil to create those entries, then there is no need to repeat this step when you change out the executable.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top