title: System.Security.SecurityException C# 2.0 windows service
body: <p>I`m tring to install my windows service on Windows 7 x64</p>
  
  <p>And getting this error</p>
  
  <pre><code>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.
  </code></pre>
  
  <p>this is my <code>MyWindowsServiceInstaller</code> code:</p>
  
  <pre><code>var processInstaller = new ServiceProcessInstaller();
              var serviceInstaller = new ServiceInstaller();
              processInstaller.Account = ServiceAccount.LocalSystem;
              serviceInstaller.DisplayName = "My Service";
              serviceInstaller.StartType = ServiceStartMode.Manual;
              serviceInstaller.ServiceName = "My Service";
              this.Installers.Add(processInstaller);
              this.Installers.Add(serviceInstaller);
  </code></pre>
  
  <p>i have set my application name to start up project</p>
  
  <p>Here is bat file </p>
  
  <pre><code>@ECHO OFF
  
  REM The following directory is for .NET 2.0
  set DOTNETFX2=%SystemRoot%\Microsoft.NET\Framework\v2.0.50727
  set PATH=%PATH%;%DOTNETFX2%
  
  echo Installing MyService...
  echo ---------------------------------------------------
  InstallUtil /i ConsoleApplication5.exe
  echo ---------------------------------------------------
  echo Done.
  pause
  </code></pre>
  
  <p>This service is not only my computer if i will solve this problem it would be solved for any other computers?</p>
  
  <p>Thanks</p>