John
John

Reputation: 6648

Simple installation of WindowsService

I'm having difficulty implementing a WindowsService with C# Express. What I want is to write a class that separates the installation logic from the service, er, service. To make this worthwhile I am looking to remove the class deriving from installer and be left with just the service itself, as I thought http://msdn.microsoft.com/en-us/library/zt39148a%28v=VS.100%29.aspx might describe. All these fancy install and packaging wizards are absent from my Express edn so I must use only .NET classes.

I'm considering ManagedInstallerClass and AssemblyInstaller and _not_ installutil, if at all possible.

Upvotes: 2

Views: 1676

Answers (1)

Jeremy
Jeremy

Reputation: 3951

Use the ManagedInstallerClass.

The answers in this question are excellent. Please check Self install windows service in .NET c# and the code midpage here http://blogs.microsoft.co.il/blogs/kim/archive/2009/01/04/self-installing-windows-service.aspx (this example uses AssemblyInstaller).

Upvotes: 2

Related Questions