windows服务安装问题 请问各位大侠,我做了个windows服务,用installutil.exe注册后,怎么在服务列表里找不到啊?还有如果我要讲windows服务做成安装程序,该怎么做啊?请有经验的朋友指点啊,我急用啊,在线等 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 是不是没有安装成功?ServiceProcessInstallerServiceInstaller你有没有用到安装程序简单的可以用命令行安装 用到了啊,但装和卸载时都提示:没有RunInstallerAttribute的公共安装程序,在windows服务的exe程序集中可能可以找到yes属性,我不太明白这样的提示 在你的服务里加一个初始化类: [RunInstallerAttribute(true)] public class ProjectInstaller: Installer { private ServiceInstaller serviceInstaller; private ServiceProcessInstaller processInstaller; public ProjectInstaller() { processInstaller = new ServiceProcessInstaller(); serviceInstaller = new ServiceInstaller(); // 服务将在系统帐户下运行 processInstaller.Account = ServiceAccount.LocalSystem; // 服务将具有手动的启动类型 serviceInstaller.StartType = ServiceStartMode.Manual; // 服务名称 serviceInstaller.ServiceName = "学习Service"; // 服务显示名称 serviceInstaller.DisplayName = "学习Service"; Installers.Add(serviceInstaller); Installers.Add(processInstaller); } }然后安装,在服务列表里就可以看到了。 怎么在已知类中,增加一个方法,方法名是变的,处理函数是一个已知代理。 受保护的构造函数有什么用 【回帖就送分】为什么用线程去移动图片会闪呀闪的啊? 请问 WinForm中的App.config文件? 急!!!!!关于播放视频组建问题?就剩90分了!!!请高手指点!!!! 怎么用JavaScript更改下拉列表中选择的项 生成目录树 C# 选择为程序集合 延迟签名后,用 CultureInfo 进行多语言切换好像就不行了 vb代码如何改成c# 我在面视的时候弄的很没脸的问题,总结一个,大家指教指教! 紧急求救,使用ImageList时出现调用的目标发生了异常?
ServiceProcessInstaller
ServiceInstaller
你有没有用到
安装程序简单的可以用命令行安装
[RunInstallerAttribute(true)]
public class ProjectInstaller: Installer
{ private ServiceInstaller serviceInstaller;
private ServiceProcessInstaller processInstaller; public ProjectInstaller()
{
processInstaller = new ServiceProcessInstaller();
serviceInstaller = new ServiceInstaller(); // 服务将在系统帐户下运行
processInstaller.Account = ServiceAccount.LocalSystem;
// 服务将具有手动的启动类型
serviceInstaller.StartType = ServiceStartMode.Manual;
// 服务名称
serviceInstaller.ServiceName = "学习Service";
// 服务显示名称
serviceInstaller.DisplayName = "学习Service"; Installers.Add(serviceInstaller);
Installers.Add(processInstaller);
}
}然后安装,在服务列表里就可以看到了。