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?
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“.
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.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With