win7 安装windows 服务 报错 System.Security.SecurityException 解决方法 An exception occurred during the Install phase. System.Security.SecurityException: The so

win7 安装windows 服务报以下的错误

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.

解决方法 

go to start > All Programs > Microsoft Visual Studio 2005 (or 2008) >Visual Studio Tools

 

and right click on "Visual Studio version Command Prompt" and go to "Run as Administrator"

 

Enter the command you are using to install your service.

(使用管理员账户安装服务)  

比如我的服务 installutil UU_STAT.exe

 

原文地址:https://www.cnblogs.com/ilahsa/p/3090714.html