h1

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

April 20, 2012

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:

Installing assembly ‘C:\i\MSofVA\Development\FossProcessor\bin\Debug\FossProcessor.exe’.
Affected parameters are:
logtoconsole =
assemblypath = C:\i\MSofVA\Development\FossProcessor\bin\Debug\FossProcessor.exe
logfile = C:\i\MSofVA\Development\FossProcessor\bin\Debug\FossProcessor.InstallLog
Installing service FossService…
Creating EventLog source FossService in log Application…
Rolling back assembly ‘C:\i\MSofVA\Development\FossProcessor\bin\Debug\FossProcessor.exe’.
Affected parameters are:
logtoconsole =
assemblypath = C:\i\MSofVA\Development\FossProcessor\bin\Debug\FossProcessor.exe
logfile = C:\i\MSofVA\Development\FossProcessor\bin\Debug\FossProcessor.InstallLog
Restoring event log to previous state for source FossService.
An exception occurred during the Rollback phase 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 during the Rollback phase of the installation. This exception will be ignored and the rollback will continue. However, the machine might not fully revert to its initial state after the rollback is complete.
Installing assembly ‘C:\i\MSofVA\Development\FossProcessor\bin\Debug\FossProcessor.exe’.
Affected parameters are:
logtoconsole =
assemblypath = C:\i\MSofVA\Development\FossProcessor\bin\Debug\FossProcessor.exe
logfile = C:\i\MSofVA\Development\FossProcessor\bin\Debug\FossProcessor.InstallLog
Installing service FossService…
Service FossService has been successfully installed.
Creating EventLog source FossService in log Application…
Committing assembly ‘C:\i\MSofVA\Development\FossProcessor\bin\Debug\FossProcessor.exe’.
Affected parameters are:
logtoconsole =
assemblypath = C:\i\MSofVA\Development\FossProcessor\bin\Debug\FossProcessor.exe
logfile = C:\i\MSofVA\Development\FossProcessor\bin\Debug\FossProcessor.InstallLog

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.

About these ads

One comment

  1. vary nice its work



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: