Tuesday, September 25, 2012

installtuil – System.Security.SecurityException: The source was not found, but some or all event logs could not be searched

The lesson for this one is when in doubt, explicitly run as administrator.  Even though my colleague is an administrator to his Windows 7 machine, when he dropped to DOS prompt to install a service using installutil, he got an error message:


"Removing EventLog source service.
An exception occurred during the uninstallation of the System.Diagnostics.EventLogInstaller installer.
System.Security.SecurityException: The source was not found, but some or all event logs could not be searched.  Inaccessible logs: Security.
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."



To get around this, we simply right clicked on  Command Prompt icon and chose to “Run as administrator“.  Then the installutil call worked fine and dandy.

No comments: