1. 加Winsow Service
2. 加Setup Project
Add -> Project Output , 选中Primary output from Winsow Service
View -> Customer Actions, Install,Commit,Rollback,Uninstall选中Primary output from Winsow Service
How to create a setup project for a Windows Service application in Visual C#
http://support.microsoft.com/kb/816169
Simple Windows Service Sample
http://www.codeproject.com/Articles/3990/Simple-Windows-Service-Sample