posted on Monday, March 15, 2004 4:11 PM
by
jdixon
Windows Service Installation Tip
When creating a Windows Service, you will find that you need to need to create an Installer class too. This Installer class registers the service with the Service Control manager which, of course, allows the service to run properly. Once your service is complete, you will want to create a Deployment project. This project installs your service on other computers. So, here's the tip:
To make the service usable on the new computer, your deployment project must invoke the service Installer class. You do this by creating a custom install action that calls your service Installer class. This is so that your service can be registered with the Service Control Manager. Don't forget to also create a custom uninstall action so that the service Installer class can unregister your service from the Service Control manager too.
I forgot the custom uninstall action. I then spent 30 minutes manually uninstalling the service entries from the registry. Don't forget the uninstall action!