社区
C#
帖子详情
windows服务安装出错的问题!!
myall2002
2003-08-26 10:54:25
用vc.net向导生成一个windows服务server.exe!
用命令 installutil server.exe 安装出错!
出错信息:
在初始化安装时发生异常:
System.IO.FileLoadException:不能运行无法验证的图像“evtrfsrv.exe”。。
...全文
484
8
打赏
收藏
windows服务安装出错的问题!!
用vc.net向导生成一个windows服务server.exe! 用命令 installutil server.exe 安装出错! 出错信息: 在初始化安装时发生异常: System.IO.FileLoadException:不能运行无法验证的图像“evtrfsrv.exe”。。
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
8 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
panyee
2003-08-26
打赏
举报
回复
不好意思,没做过vc.net的
myall2002
2003-08-26
打赏
举报
回复
它的模板中只提供安装的方法,没有卸载的方法,应该怎样写才对呢?
myall2002
2003-08-26
打赏
举报
回复
to panyee(快乐王子) :
那请问你应该用什么来安装呢?应该怎样才能使用vc.net来做的服务呢?多谢!!
panyee
2003-08-26
打赏
举报
回复
vc.net的服务不是用installutil来安装
vc#.net做的服务可以
csharplove
2003-08-26
打赏
举报
回复
关注
myall2002
2003-08-26
打赏
举报
回复
if (argc >= 2)
{
if (argv[1][0] == _T('/'))
{
argv[1][0] = _T('-');
}
//使用 InstallUtil.exe 安装此 Windows 服务
String* myargs[] = System::Environment::GetCommandLineArgs();
String* args[] ;
AppDomain* dom = AppDomain::CreateDomain(S"execDom");
Type* type = __typeof(System::Object);
String* path = type->get_Assembly()->get_Location();
StringBuilder* sb = new StringBuilder(path->Substring(0, path->LastIndexOf(S"\\")));
if (_tcsicmp(argv[1], _T("-Install")) == 0)
{
args = new String*[myargs->Length-1 ];
sb->Append(S"\\InstallUtil.exe");
args[0] = (myargs[0]);
Array::Copy(myargs, 2, args, 1, args->Length -1);
}
else
{
args = new String*[myargs->Length];
sb->Append(S"\\InstallUtil.exe");
args[0] = S"/u";
args[1] = (myargs[0]);
// Array::Copy(myargs, 2, args, 2, args->Length -2);
}
for( int i = 0 ;i < args->Length ; i++)
Console::WriteLine(args[i]);
dom->ExecuteAssembly(sb->ToString(), 0, args);
}
else
{
ServiceBase::Run(new evTrfSrvWinService());
}
return 0;
OK!!!!!!!
myall2002
2003-08-26
打赏
举报
回复
//若要安装服务,请键入: "server.exe -Install"
int _tmain(int argc, _TCHAR* argv[])
{
if (argc >= 2)
{
if (argv[1][0] == _T('/'))
{
argv[1][0] = _T('-');
}
//使用 InstallUtil.exe 安装此 Windows 服务
String* myargs[] = System::Environment::GetCommandLineArgs();
String* args[] ;
AppDomain* dom = AppDomain::CreateDomain(S"execDom");
Type* type = __typeof(System::Object);
String* path = type->get_Assembly()->get_Location();
StringBuilder* sb = new StringBuilder(path->Substring(0, path->LastIndexOf(S"\\")));
if (_tcsicmp(argv[1], _T("-Install")) == 0)
{
args = new String*[myargs->Length -1];
sb->Append(S"\\InstallUtil.exe");
args[0] = (myargs[0]);
Array::Copy(myargs, 2, args, 1, args->Length -1);
}
if (_tcsicmp(argv[1], _T("-unInstall")) == 0)
{
args = new String*[myargs->Length];
args[0] = S"/u";
args[1] = (myargs[0]);
Array::Copy(myargs, 2, args, 2, args->Length -2);
}
for( int i = 0 ;i < args->Length ; i++)
Console::WriteLine(args[i]);
dom->ExecuteAssembly(sb->ToString(), 0, args);
}
else
{
ServiceBase::Run(new serverWinService());
}
return 0;
}
当使用server.exe -install安装时成功!
但使用server.exe -uninstall卸载时失败!
错误信息:未处理的异常: System.IO.FileLoadException: 访问被拒绝:“v1.1.4322”。
文件名: “v1.1.4322”
请问应该怎样处理??
myall2002
2003-08-26
打赏
举报
回复
哦!!没关系!!
有谁做过的吗??
windows
installer
服务
出错
修复工具
windows
installer
出错
、软件无法
安装
、.net frawork
出错
问题
,如果
安装
软件时出现
windows
installer
服务
无法启动等
问题
,或.net frawork无法
安装
时都可以使用此工具进行修复操作!!!请一定试试,网络其他的覆盖
安装
,修改注册表等方法都是无法成功的。!!此为绿色版!
windows
10
安装
MongoDB详细教程!!!
场景说明:线上环境使用的Linux的MongoDB,本地为
windows
操作系统,为此搭建一个
windows
本地MongoDB左右开发测试使用。 1、初始化部署MongoDB 第一步需要下载
windows
版本的MongoDB,我这里下载使用的是3.4.3版本,最新版本已经更新到5.x,大家根据需求进行下载部署
安装
官网下载地址:MongoDB Community Downloads | MongoDB 这里滑动找到到对应版本进行下载即可,
windows
选择x86_64 x64 注意:Mongo
【C#】
Windows
服务
(Service)
安装
及启停
今天,我们完成了一个应用程序的开发,我们要将其设置成开机自启程序,继上篇文章介绍有两种方式。一种,开机启动目录下创建应有程序的快捷方式;另一种,写
Windows
服务
;我们现在采用“
服务
方式自启程序”。因为用户不具备管理员权限,为了安全考虑,我们方便监控管理。最终确认方案二。先说说我们面临的
问题
,或者说是待解决的
问题
:①
安装
服务
,通过咱新开发的C#应用软件
安装
,不希望借助第三方工具(installutil.exe),因为面向人群非科班出身,操作越简单越好。
windows
下
安装
ssh
服务
器
1、使用openssh。因为在ubuntu下使用apt-get
安装
命令时,就是
安装
openssh。 2、点击:http://www.mls-software.com/opensshd.html#botpage。这里教你怎样
安装
openssh for
windows
。不好找啊!
Windows
安装
oracle 11g出现错误: 启动
服务
出现错误 找不到
服务
OracleMTSRecoveryService的解决方案
Windows
安装
oracle 11g出现错误: 启动
服务
出现错误 找不到
服务
OracleMTSRecoveryService的解决方案 第一步 Ctrl + R —> 输入regedit打开注册表 第二步 在注册表查找HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\OracleMTSRecoveryService 修改对应的路径解决 修改ImagePath的值即可 ,oracle
安装
路径 如: D:\app\tina\product
C#
110,533
社区成员
642,574
社区内容
发帖
与我相关
我的任务
C#
.NET技术 C#
复制链接
扫一扫
分享
社区描述
.NET技术 C#
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
让您成为最强悍的C#开发者
试试用AI创作助手写篇文章吧
+ 用AI写文章