Can XCOPY deploy a Windows service?

I have a Windows service that is already installed on the server, and I have a new version of executable and related assemblies. The usual procedure that I use to install the new version is:

  • Stop service
  • Uninstall the service using InstallUtil /u
  • Overwrite the service executable and related assemblies with new
  • Install the service using InstallUtil
  • Start the service

I wonder if I do too much? Are there any problems with the following:

  • Stop service
  • Overwrite the service executable and related assemblies with new
  • Start the service

I do not think that uninstallation / installation is necessary, but could not find official confirmation.

+4
source share
1 answer

If the service is already installed, yes, you can unzip your new executable and xcopy assemblies without any problems.

All installutil creates the appropriate registry entries that point to the service executable. If you previously ran installutil to create these entries, then there is no need to repeat this step when changing the executable file.

+4
source

Source: https://habr.com/ru/post/1394654/


All Articles