Windows service does not appear during installation using the installation project

I have a simple Windows service developed in VS.net 2008 and VB.net. When I install the service using Installutil.exe from the command line, it works like a charm.

When I try to add an installation project and install the output, as well as install and install it, although it says that it was successfully installed, it does not appear in the services.

The event log shows that it has been successfully installed. I just checked the registry, it placed assemblies in HKEY_CURRENT_USER \ Software \ Microsoft \ installer \ assemblylies.

But I do not understand why it is not displayed in the list of services. I updated and restarted.

Any thoughts ??

thanks

+6
windows web-services service
source share
3 answers

A few ideas:

Are you installing under the same Windows account that you are trying to run it? Do you have the Setup Project property "InstallAllUsers" set to True?

Are you sure that the ProductName and Title properties are correctly configured in Project Setup? Perhaps the service appears in the list under a different name, that is, "SetupProject1" or something like that.

Similarly, in your ProjectInstaller class, in the constructor view, look at the ServiceInstaller properties and make sure that the ServiceName and DisplayName properties are configured to what you want.

+1
source share

Solution Found You must add a custom action to your MSI project. Therefore, in custom actions, add the output of your service to the Installation section. Then the required installation code for your service will be executed. same as installutil.exe file

thanks for the help

+11
source share

I had the same problem and did not pay attention to the part before creating the installation project. http://msdn.microsoft.com/en-us/library/zt39148a(v=VS.100).aspx

To create installers for your service

In Solution Explorer, right-click Service1.vb or Service1.cs and select View Designer.

Click the designer’s background to select the service itself, not any of its contents.

With the designer in focus, right-click and select "Add Installer."

By default, a component class containing two installers is added to your project. The component is called ProjectInstaller, and the installers that it contains are the installer for your service and the installer for the service-related process.

In the Design view for ProjectInstaller, click ServiceInstaller1 or serviceInstaller1.

In the Properties window, verify that the ServiceName property is set to MyNewService.

Set the StartType property to Automatic.

In the designer, click ServiceProcessInstaller1 (for a Visual Basic project) or serviceProcessInstaller1 (for a Visual C # project). Set the Account property for LocalSystem. This will cause the service to be installed and running on the local service account.

+6
source share

All Articles