I am installing the windows service via Bat file. I even ran the bat file as administrator.The required dot net framework is also there in the machine. The OS is windows 7 64 bit. The below is developed in 3.5 framework
But on installation I am getting the below error
System.Security.SecurityException: The source was not found, but some or all event logs could not be searched. Inaccessible logs: Security
Below is the content in bat file
@echo off
set SERVICE_HOME="D:\New folder (5)"
set SERVICE_EXE=PDF_Data_Tool.exe
REM the following directory is for .NET 1.1, your mileage may vary
set INSTALL_UTIL_HOME=C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\
set PATH=%PATH%;%INSTALL_UTIL_HOME%
cd %SERVICE_HOME%
echo Installing Service...
installutil %SERVICE_EXE%
echo Done.
PAUSE
What I have tried:
Tried installing and uninstalling of windows service via the bat file as administrator/ and not as administrator
@echo off
set SERVICE_HOME="D:\New folder (5)"
set SERVICE_EXE=PDF_Data_Tool.exe
REM the following directory is for .NET 1.1, your mileage may vary
set INSTALL_UTIL_HOME=C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\
set PATH=%PATH%;%INSTALL_UTIL_HOME%
cd %SERVICE_HOME%
echo Installing Service...
installutil %SERVICE_EXE%
echo Done.
PAUSE