views:

2256

answers:

3

I have a window service project in visual studio 2008. I've also added the setup and deployment project. Unfortunately, when I install it, the services does not show up in the services mmc snapin.

I have already added the ProjectInstaller to the service project, and I've followed the instructions here already: http://www.branded3.com/c-windows-services-creating-an-msi-installer/

Thanks!

+1  A: 

If you're not married to the idea of using an MSI, you might consider trying this: http://www.codeproject.com/KB/cs/DynWinServiceInstallUtil.aspx

Dinah
+2  A: 

If you're willing to use WiX, you can use the <ServiceInstall> element to install your service.

http://www.wixwiki.com/index.php?title=ServiceInstall_Element

Jesse Weigert
+6  A: 

What you're looking for (and that article has nothing on this, that I can see) is a ProjectInstaller class. If you open your service up in design view, you can right-click and select "Add Installer." This adds a class to your project called, by default (I think), ProjectInstaller.cs. In design view, you will see two items with the default names ServiceProcessInstaller1 and ServiceInstaller1. Change the properties on each for what account you want your service to run under, what the service name is, description, etc.

Then, in your MSI project, click on the Custom Actions Editor icon and add the "Primary output from YourServiceProject" to all of the actions, Install, Commit, Rollback, and Uninstall.

Here's an older walk-through from Microsoft.

Best of luck.

AJ
Thank you, helped me out.
ccook