I am trying to install window service from command prompt. The installation of service is failed because the system throws an security issue. The error is
Installing service SrvConfigurationManager...
Creating EventLog source SrvConfigurationManager in log Application...
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.
Installation is rolling back because the system is not been able to create event log. For the installation I have given the full control to Network-Service
in Security and Application in Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\EventLog
in Registry Editor. Even though the same error persist.
I am trying to install window service like this from Command Prompt:
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\InstallUtil.exe "F:\Projects\ConfigManager\bin\Debug\SrvConfigurationManager.exe"
I have also tried to create the event log using this reference but the result is same.Now my question is:
- Anything wrong with my installation?
- How do I install Windows Service?
Reference taken from
How to: Install and Uninstall Services
How to create a setup project for a Windows Service application in Visual C#