I have a few applications written in C#, one of them being a Windows Service.
I am now in the process of writing an automated installation project, and I've hit a stumbling block in that I need a simple and robust way of installing the Windows Service through C# code.
The Windows Service, in the past, has used its own Setup project to install it.
From what I can gather, the actual installation of the Service (i.e. registering it in Windows to show in services.msc) is all done by the Setup project calling the Install method of the Installer class in the Service project.
How can I do this from my own C# code?
I would also want to call the Uninstall on the Install class too.