Here is a great write up on making your vb.net windows service easy to install.
This worked the first time I tried it, which I can’t say for every instruction list I find on the “Internets”.
This article describes how to create a setup project for a Windows Service application (formerly named an “NT service”). To do this, you must first create a solution that contains a simple Windows Service project that writes an entry to its application log. You then add a setup project to the solution to install the Window Service. Finally, you start the service. You can start the service by using the Services item in the Administrative Tools folder in the Start menu.
The following list outlines the recommended hardware, software, network infrastructure, and service packs that you must have:
- Microsoft Windows 2000, Windows XP, Windows Server 2003, or a later Microsoft operating system with the .NET Framework installed
- Microsoft Visual Studio .NET Enterprise, Microsoft Visual Studio .NET Enterprise Architect, Microsoft Visual Studio 2005, or Microsoft Visual Studio 2008.
This article also assumes that the user account that you use to install and to run this service has the permissions that you must have to install and to start services, and also has the permissions that you must have to access the event log.
This section describes how to create a Windows Service project, and how to use a compiled setup project to install the Windows Service.
- Start Microsoft Visual Studio.
- On the File menu, point to New, and then click Project.
- Click Visual C# Projects under Project Types, and then click Windows Service under Templates.Note In Visual Studio 2005 or Visual Studio 2008, expand Visual C# under Project Types, click Windows, and then clickWindows Service under Templates.
- Type LogWriterService in the Name text box, and then type C:\ in the Location text box. Click OK.
- In Solution Explorer, right-click Service1.cs, and then click View Code.
- In the OnStart event handler, replace the comments with the following code:
EventLog.WriteEntry("My simple service started.");
- In Solution Explorer, double-click Service1.cs.
- In the Code Editor window, right-click Design View, and then click Properties
- In the Properties pane, click the Add Installer link.
- In the Properties pane for ServiceInstaller1, change the ServiceName property to Service1.
- In the Code Editor window in Design view, click ServiceProcessInstaller1.
- In the Properties pane, change the Account property to LocalSystem (The LocalService and NetworkService values are available only in Microsoft Windows XP).
After you complete the steps in the previous section to configure the Windows Service project, follow these steps to add a deployment project that packages the service application so that the service application can be installed:
- Add a new project to your LogWriterService project. To do this, follow these steps:
- In Solution Explorer, right-click Solution ‘LogWriterService’ (1 project), point to Add, and then click New Project.
- Click Setup and Deployment Projects under Project Types, and then click Setup Project under Templates.
- In the Name text box, type ServiceSetup.
- Type C:\ in the Location text box, and then click OK.
- Tell the deployment project what to package. To do this, follow these steps:
- In Solution Explorer, right-click ServiceSetup, point to Add, and then click Project Output
- In the Add Project Output Group dialog box, in the Project box, click LogWriterService
- Click Primary Output, and then click OK.
- For correct installation, add only primary output. To add the custom actions, follow these steps:
- In Solution Explorer, right-click ServiceSetup, point to View, and then click Custom Actions
- Right-click Custom Actions, and then click Add Custom Action.
- Click Application Folder, and then click OK.
- Click Primary output from LogWriterService (Active), and then click OK.Notice that Primary output appears under Install, Commit, Rollback and Uninstall.
- By default, setup projects are not included in the build configuration. To build the solution, use one of the following methods:To install the newly built service, right-click ServiceSetup, and then click Install.
- Method 1
- Right-click LogWriterService, and then click Build.
- Right-click ServiceSetup, and then click Build.
- Method 2
- On the Build menu, click Configuration Manager to build the whole solution.
- Click to select the Build check box for ServiceSetup.
- Press F7 to build the whole solution. When the solution is built, you have a complete installation package that is available for the service.
- Method 1
- In the ServiceSetup dialog box, click Next three times. Notice that a progress bar appears while the service installs.
- When the service is installed, click Close.
Original article at: http://support.microsoft.com/kb/816169