我已经创建了服务,使用installulit.exe注册服务成功,但是部署windows服务后,安装后在服务列表没有显示,请诸位高手不吝赐教!
解决方案 »
- 依赖注入框架的C#实现(连载之二)赤裸裸的实现
- 关于如何判断数据库是否存在?
- C# 调用 C++ dll 问题
- 小弟现在想了解常见小游戏如五子棋,俄罗斯方块,贪食蛇等的源代码...
- c#读取摄像头在图像上加个矩形框
- 在线等待:"C++"英语里怎么读,是不是"C plus plus"
- VS2005创建的WEB服务项目发布到IIS定义的一个虚拟目录中后,在IIS中浏览不了啊,各位大哥大姐帮帮偶哦!
- datagrid删除某一行,如何获取该行
- 如何获取或者遍历一个EXCEL文件中所有的SHEET????
- 打开窗体设计器报错
- 请问如何把string(非数字) 转换成 uint
- 怎样在c#中实现向数据库中插入数据的问题啊?
http://mindotnet.cnblogs.com/archive/2004/10/14/52078.html
[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 = "Mediation-Pretreat";
// 服务显示名称
serviceInstaller.DisplayName = "Mediation-Pretreat Service"; Installers.Add(serviceInstaller);
Installers.Add(processInstaller);
}
}
建议创建Windows Service安装项目,如上。