在“安装”阶段发生异常。 System.Security.SecurityException: 未找到源,但未能

 写Windows服务的时候,运行了一下,就是没反应,命令框一闪而过,查了一下异常,大致是题目的那样。原因是因为权限不足。但是在网上搜的方法都不顶用。

解决方法如下:

(1)以管理员身份运行CMD;

(2)而后将CMD中的路径调整到bat文件所在路径下,比如路径为“D:\Debug”。

(3)而后在CMD中输入“install.bat”即可正确安装。

%SystemRoot%\Microsoft.NET\Framework\v4.0.30319\installutil.exe CableAnti.Service.exe
Net Start CheckOnlineService
sc config CheckOnlineService start= auto

posted @ 2020-09-22 11:40  乌卡拉卡  阅读(959)  评论(0编辑  收藏  举报