Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

My service failed to uninstall

I recently tried to change the display name of my windows service, but apparantly I messed up. An old version fails to uninstall completely and I cannot install a new version of the windows service. This is the error generated from running installutil /i myService:

An exception occurred during the uninstallation of the System.Diagnostics.EventLogInstaller installer.
System.InvalidOperationException: The event log source '7 Ac Service' cannot be deleted, because it's equal to the log name.
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.

So the event log source is equal to the log name. What does that mean and how do I fix it?

like image 357
Kasper Hansen Avatar asked Mar 29 '11 07:03

Kasper Hansen


People also ask

How do I force a service to Uninstall?

You can also remove services using a command line. Hold down the Windows Key, then press “R” to bring up the Run dialog. Type “SC DELETE servicename“, then press “Enter“.

How do I Uninstall a program that won't Uninstall?

Uninstall from Control Panel In search on the taskbar, enter Control Panel and select it from the results. Select Programs > Programs and Features. Press and hold (or right-click) on the program you want to remove and select Uninstall or Uninstall/Change. Then follow the directions on the screen.

Why is my Uninstall not working?

Start Windows 10 into Safe Mode to Uninstall the Program. If you are unable to uninstall program Windows 10, it might because the uninstall process is interfered by third-party processes. The solution is to boot your Windows 10 computer into Safe Mode, and then remove the program in Safe Mode.


1 Answers

I found out myself. This post helped. So there are basically 3 places in the registry in the same name as the windows service. So I tried first to write a console application to remove the eventlog:

System.Diagnostics.EventLog.Delete("7 Ac Service");

It took care of 2 of them. I removed the last one manually using regedit. Then my windows service installed without problems.

like image 141
Kasper Hansen Avatar answered Oct 12 '22 23:10

Kasper Hansen