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.

4 comments

  1. vary nice its work


  2. It help me lot thanks


  3. it’s realy helpfull thank you so much


  4. It help me lot thanks



Leave a reply to s Cancel reply