.NET Service Installation Errors

I am having trouble installing a custom print service that I inherited from past developers. The application is designed to monitor a shared folder and then print the .PDF documents that are generated by end-user processes to the printer as defined by the user who started the process.

I am unable to install the service using the following command via CMD running as an administrator:

C:\Windows\Microsoft.NET\Framework\v2.0.50727\InstallUtil.exe "C:\Program Files (x86)\Madison Capital Management\PrintServiceSetup\PrintService.exe"

The error I receive is as follows:
An exception occurred during the Install phase. System.ComponentModel.Win32Exception: The specified service already exists.

I don't understand why the process states that the process already exists because the process name is not in the process list that I receive when I run Get-Services via PowerShell (see attached Services.xlsx

The PrintService is set to run as a domain proxy account called (domain name)\apolloservice. The user account is an administrator on the server and is in granted rights to logon as a service via Local Policy.

My only thought is that the install process is corrupt or the entry in the Windows event log for the service is causing a problem (please see attached screen shots of the logs and install process).

Any thoughts are greatly apprecaited because I have been beating my head against my desk for almost 2 days on this problem.

Thanks!
Mick
Services.xlsx
InstallErrors.png
WindowsServerLogEntry.png
MadisonCapITAsked:
Who is Participating?
 
MadisonCapITAuthor Commented:
Also, below is the VB code that defines the user that will run the service.

        Me.ServiceProcessInstaller1 = New System.ServiceProcess.ServiceProcessInstaller
        Me.ServiceInstaller1 = New System.ServiceProcess.ServiceInstaller
        '
        'ServiceProcessInstaller1
        '
        Me.ServiceProcessInstaller1.Password = "{password}"
        Me.ServiceProcessInstaller1.Username = "{domain name}\apolloservice"
        '
        'ServiceInstaller1
        '
        Me.ServiceInstaller1.Description = "Prints documents generated by MarketPlace"
        Me.ServiceInstaller1.DisplayName = "PrintService"
        Me.ServiceInstaller1.ServiceName = "PrintService"
        Me.ServiceInstaller1.StartType = System.ServiceProcess.ServiceStartMode.Automatic
        '
        'ProjectInstaller
        '
        Me.Installers.AddRange(New System.Configuration.Install.Installer() {Me.ServiceProcessInstaller1, Me.ServiceInstaller1})

Open in new window

0
 
Daniel Van Der WerkenIndependent ConsultantCommented:
Have you run installutil.exe and installed the service and then used installutil.exe to uninstall this same service? I have had consistent troubles with this utility and have noticed that I can't get the service to reinstall properly unless I reboot the system.

So, first off, reboot your system and then try to use installutil.exe again as you have already done so.

The next thing I'd do after that is check the registry to see if the service is registered. It could be that the service is listed in the registry in such a way that it's not actually showing up in the services listings you're getting, but its keeping the installer from installing it.

That's all I have for now.
0
 
MadisonCapITAuthor Commented:
I have run the installutil.exe with the -u escape character to uninstall the service and then reboot the server twice without any luck. I am thinking that there are two possible problems: 1) the service is trying to install twice (looking at the screen shot there are two install notes) 2.) the custom log entry in the event log is causing problems.

Are we able to delete a custom event log folder?

Thanks!
0
 
MadisonCapITAuthor Commented:
That was exactly what I needed. Who would have thought that the InitializeComponent() method was being called twice. Weird.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.