locked
Error while using Installutil for installing windows service application. RRS feed

  • Question

  • I new to .net My project involves developing a windows service application using VB .NET. I have installed the service successfuly on the first attempt using the installutil provided by the frame work. When i uninstalled the application the it gave me the following result.

    System.ComponentModel.Win32Exception: The specified service does not exist as an installed service
    An exception occurred while uninstalling. This exception will be ignored and the
     uninstall will continue. However, the application might not be fully uninstalle
    d after the uninstall is complete.

    The uninstall has completed.

    When i tried to install the app again it gave me the following error

    An exception occurred during the Install phase.
    System.ComponentModel.Win32Exception: The specified service already exists

    I removed the application from the list of application event log entries in the registry(HKEY\LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\EventLog\Application) ant tried installing the app agin it installed successfully. Why is uninstalling the service not removing the entry from the registry. Is that i should change some properties of the installer component.

    Any help would be highly appretiated.

    Monday, February 12, 2007 2:07 PM

Answers

  • I have this problem when using 'Repair'.

    My Visual Studio solution consists of two Windows Services and one Setup project. The setup project encapsulates both windows services.

    What's happening is that Install/Uninstall works fine. However, if I use 'Repair' after installation the installer works a little and then shows a message "The specified service already exists" and rolls back. I look in the Services list and one of the two services is gone! I try to uninstall and I get the message "An exception occurred while uninstalling. This exception will be ignored and the uninstall will continue. However, the application might not be fully uninstalled after the uninstall is complete. --> The specified service does not exist as an installed service." and it rolls back.

    Now if I use 'Repair' again the missing service is re-installed.

    Why is one of the services uninstalling on the first 'Repair'?

    Friday, March 16, 2007 7:08 AM
  •  

    Hello Giridhar,

    You can create msi for Windows Service installation. For this you need to create a setup project in your Visual Studio. Add the outpput of your project to folders/files of setup project. In custom actions section, add your executable in install and uninstall events. The install and uninstall logics you can have in your windows service project in your installer (you must have added an installer while creating windows service).

    Tuesday, February 13, 2007 9:21 AM

All replies

  •  

    Hello Giridhar,

    Actually there should not be any issue while installing/uninstalling windows service using installutill. I am not sure why you are getting that. Well, you may like to use msi installation for webservice installation. It should be easy and better then using installutill. 

     

    Monday, February 12, 2007 2:22 PM
  • If you run into this issue again, try looking in the eventlog and see if it has more helpful information about the error.  If so, please post the contents of that message.
    Monday, February 12, 2007 6:03 PM
    Moderator
  • Thanks for the response Ashish Basran. My application is not a web service application. Can i still use this msi installation. Is this utility a part of .NET FrameWork package.
    Monday, February 12, 2007 8:07 PM
  • Hi Jared Parsons MSFT. I tried uninstalling once again and Checked event Viewer for any new messages in Application and system Event Logs but there was no new messages.
    Monday, February 12, 2007 8:09 PM
  • Do you have any custom uninstall logic in your MSI? 

     

    Monday, February 12, 2007 8:45 PM
    Moderator
  •  

    Hello Giridhar,

    You can create msi for Windows Service installation. For this you need to create a setup project in your Visual Studio. Add the outpput of your project to folders/files of setup project. In custom actions section, add your executable in install and uninstall events. The install and uninstall logics you can have in your windows service project in your installer (you must have added an installer while creating windows service).

    Tuesday, February 13, 2007 9:21 AM
  • No i dont have any custom uninstall logic.
    Tuesday, February 13, 2007 8:34 PM
  • Did you use the "Repair" functionality? I've noticed that by default it doesn't work and can cause the problem which you described above
    Friday, February 23, 2007 4:44 PM
  • I have this problem when using 'Repair'.

    My Visual Studio solution consists of two Windows Services and one Setup project. The setup project encapsulates both windows services.

    What's happening is that Install/Uninstall works fine. However, if I use 'Repair' after installation the installer works a little and then shows a message "The specified service already exists" and rolls back. I look in the Services list and one of the two services is gone! I try to uninstall and I get the message "An exception occurred while uninstalling. This exception will be ignored and the uninstall will continue. However, the application might not be fully uninstalled after the uninstall is complete. --> The specified service does not exist as an installed service." and it rolls back.

    Now if I use 'Repair' again the missing service is re-installed.

    Why is one of the services uninstalling on the first 'Repair'?

    Friday, March 16, 2007 7:08 AM
  • I have fixed this problem by removing the Primary Output from the Rollback Custom Actions.
    Friday, March 16, 2007 10:48 AM
  • You probably installed the service under name X, then changed the name of the service (.ServiceName) in code to name Y, build that and then tried to un-install service X.

    Monday, March 19, 2007 2:01 PM
  • I have this problem when using 'Repair'.

    My Visual Studio solution consists of two Windows Services and one Setup project. The setup project encapsulates both windows services.

    What's happening is that Install/Uninstall works fine. However, if I use 'Repair' after installation the installer works a little and then shows a message "The specified service already exists" and rolls back. I look in the Services list and one of the two services is gone! I try to uninstall and I get the message "An exception occurred while uninstalling. This exception will be ignored and the uninstall will continue. However, the application might not be fully uninstalled after the uninstall is complete. --> The specified service does not exist as an installed service." and it rolls back.

    Now if I use 'Repair' again the missing service is re-installed.

    Why is one of the services uninstalling on the first 'Repair'?

    I repaired then uninstalled. It worked!!!
    Thursday, November 4, 2010 11:53 AM