.NET Service Installation Errors

Posted on 2012-09-06
Last Modified: 2012-09-15
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.

Question by:MadisonCapIT

    Author Comment

    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
            Me.ServiceProcessInstaller1.Password = "{password}"
            Me.ServiceProcessInstaller1.Username = "{domain name}\apolloservice"
            Me.ServiceInstaller1.Description = "Prints documents generated by MarketPlace"
            Me.ServiceInstaller1.DisplayName = "PrintService"
            Me.ServiceInstaller1.ServiceName = "PrintService"
            Me.ServiceInstaller1.StartType = System.ServiceProcess.ServiceStartMode.Automatic
            Me.Installers.AddRange(New System.Configuration.Install.Installer() {Me.ServiceProcessInstaller1, Me.ServiceInstaller1})

    Open in new window

    LVL 19

    Expert Comment

    by:Daniel Van Der Werken
    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.

    Author Comment

    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?

    LVL 83

    Accepted Solution


    Author Closing Comment

    That was exactly what I needed. Who would have thought that the InitializeComponent() method was being called twice. Weird.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    The problems with reply email signatures

    Do you wish that you could place an email signature under a reply? Well, unfortunately, you can't. That great Exchange/Office 365 signature you've created will just appear at the bottom of an email chain. What a pain! Is there really no way to solve this? Well, there might be...

    Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
    I was supporting a handful of Windows 2008 (non-R2) 2 node clusters with shared quorum disks. Some had SQL 2008 installed and some were just a vendor application that we supported. For the purposes of this article it doesn’t really matter which so w…
    This tutorial will walk an individual through the steps necessary to configure their installation of BackupExec 2012 to use network shared disk space. Verify that the path to the shared storage is valid and that data can be written to that location:…
    This tutorial will show how to configure a single USB drive with a separate folder for each day of the week. This will allow each of the backups to be kept separate preventing the previous day’s backup from being overwritten. The USB drive must be s…

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    7 Experts available now in Live!

    Get 1:1 Help Now