4

I am trying to uninstall a recently installed service, I am running this in command line:

c:\Windows\Microsoft.NET\Framework\v4.0.30319>installutil.exe /u "C:\inetpub\www
root\xxx\xxx\xxx.exe"

But I am getting this:

The uninstall has completed.
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.

And this:

Removing EventLog source xxx.
An exception occurred during the uninstallation of the System.Diagnostics.EventL
ogInstaller installer.
System.Security.SecurityException: Requested registry access is not allowed.
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.

I have no idea where to begin and I really need to uninstall these so any help is appreciated

4
  • Do you have rights to modify the registry on that machine ? Commented Nov 26, 2013 at 18:11
  • Yes I have rights to modify the registry Commented Nov 26, 2013 at 18:14
  • Try running the command prompt in admin mode. Commented Nov 26, 2013 at 18:15
  • Hi i dont know why this worked but when I ran installutil instead of installutil.exe it worked. Thank you for responding to my question Commented Nov 26, 2013 at 18:17

2 Answers 2

19

I was facing exact same issue.

The issue is resolved by opening the Command Prompt as Administrator.

Sign up to request clarification or add additional context in comments.

Comments

0

My guess is that you are probably trying to remove a service using a user account which does not have sufficient rights. Specifically, the issue in this case is the removal of some EventLog registry keys during Uninstall.

This may also occur when you are logged in as a user with Administrator privileges yet did not run the Command Prompt in 'Administrator Mode'.

One way to fix this is to make sure that you are running the Command Prompt in Administrator mode. (Right-click > Run as Administrator)

I have also encountered some cases where this method still fails to solve the SecurityException problem due to some registry keys not having 'Full Control' permissions for Administrator accounts.

The following keys should have 'Full Control' set for Administrators in order for the service to be able to write to the EventLog:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\EventLog HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\EventLog\Application

This may be done by:

  1. Invoking the Windows Registry Editor
    • Run [Win + R]
    • Type 'regedit'
    • OK
  2. Navigate a path listed about
  3. Right click on the desired path
  4. Make sure that both Read and Full Control permission checkboxes are ticked for Administrators
  5. Click Apply and OK
  6. Repeat the same process for the other path

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.