title: Installation failure of Windows Service
body: <p>I have made a Windows Service, when I tried to install it, I get this message : </p>
  
  <blockquote>
    <p>D:\workspace\TestWindowsService\TestWindowsService\bin\Debug>InstallUtil.exe
    TestWindowsService.exe Microsoft (R) .NET Framework Installation
    utility Version 4.6.1586.0 Copyright (C) Microsoft Corporation.  All
    rights reserved.</p>
    
    <p>Running a transacted installation.</p>
    
    <p>Beginning the Install phase of the installation. See the contents of
    the log file for the
    D:\workspace\TestWindowsService\TestWindowsService\bin\Debug\TestWindowsService.exe
    assembly's progress. The file is located at
    D:\workspace\TestWindowsService\TestWindowsService\bin\Debug\TestWindowsService.InstallLog.
    Installing assembly
    'D:\workspace\TestWindowsService\TestWindowsService\bin\Debug\TestWindowsService.exe'.
    Affected parameters are:    logtoconsole =    logfile =
    D:\workspace\TestWindowsService\TestWindowsService\bin\Debug\TestWindowsService.InstallLog
    assemblypath =
    D:\workspace\TestWindowsService\TestWindowsService\bin\Debug\TestWindowsService.exe
    Installing service Scheduler... Creating EventLog source Scheduler in
    log Application...</p>
    
    <p>An exception occurred during the Install phase.
    System.Security.SecurityException: The source was not found, but some
    or all event logs could not be searched.  Inaccessible logs: Security.</p>
    
    <p>The Rollback phase of the installation is beginning. See the contents
    of the log file for the
    D:\workspace\TestWindowsService\TestWindowsService\bin\Debug\TestWindowsService.exe
    assembly's progress. The file is located at
    D:\workspace\TestWindowsService\TestWindowsService\bin\Debug\TestWindowsService.InstallLog.
    Rolling back assembly
    'D:\workspace\TestWindowsService\TestWindowsService\bin\Debug\TestWindowsService.exe'.
    Affected parameters are:    logtoconsole =    logfile =
    D:\workspace\TestWindowsService\TestWindowsService\bin\Debug\TestWindowsService.InstallLog
    assemblypath =
    D:\workspace\TestWindowsService\TestWindowsService\bin\Debug\TestWindowsService.exe
    Restoring event log to previous state for source Scheduler. 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.</p>
    
    <p>The Rollback phase completed successfully.</p>
    
    <p>The transacted install has completed. The installation failed, and the
    rollback has been performed.</p>
  </blockquote>
  
  <p>I couldn't find what to do from this message. How can I fix my problem? Thanks.</p>