Self-Installing .NET Windows Service

Development Comments

Did you ever write a .NET Windows service? What I really dislike about it is that though the framework provides the System.ServiceProcess.ServiceInstaller class, you still have to use the external installutil tool.

Well, at least until today.

After some googling I found Craig Andera's article HowTo: Write a Self-Installing Service. Only a few lines of code are needed to get your service registering itself. Cool Awesome, Craig.

Why didn't Microsoft document that way? (Ok, they doc'd TransactedInstaller, but if you don't know where to search... sigh)

Comments