C#windows service效劳装置、注册、判别效劳能否存在、能否发动
2013-03-13 00:00
281 查看
#region Windows效劳控制区 #region 装置效劳 private void InstallService(IDictionary stateSaver, string filepath) { try { ServiceController http://www.kp1111.info/linked/20130312.do service = new ServiceController("ServiceName"); if (!ServiceIsExisted("ServiceName")) { //Install Service AssemblyInstaller myAssemblyInstaller = new AssemblyInstaller(); myAssemblyInstaller.UseNewContext = true; myAssemblyInstaller.Path = filepath; myAssemblyInstaller.Install(stateSaver); myAssemblyInstaller.Commit(stateSaver); myAssemblyInstaller.Dispose(); //--Start Service service.Start(); } else { if (service.Status != System.ServiceProcess.ServiceControllerStatus.Running http://www.aaafaipiao.com/linked/20130312.do[/code]
相关文章推荐
- vs.net c# 安装、注册windows service服务,判断服务是否存在,是否启动
- vs.net c# 安装、注册windows service服务,判断服务是否存在,是否启动
- C#windows service服务安装、注册、判断服务是否存在、是否启动
- C#windows service服务安装、注册、判断服务是否存在、是否启动
- c# 安装、注册windows service服务,判断服务是否存在,是否启动
- vs.net c# 安装、注册windows service服务,判断服务是否存在,是否启动
- vs.net c# 安装、注册windows service服务,判断服务是否存在,是否启动
- C# 通过 Quartz .NET 实现Timer Job并将其注册成为Windows Service
- C#对Windows服务操作(注册安装服务,卸载服务,启动停止服务,判断服务存在)
- C#检验Windows Service是否存在和启动
- C#Windows服务Service1代码
- C# windows service
- C#创建Windows Service(Windows 服务)基础教程
- c# windowsService 的基本操作
- C#的Timer控件在Windows Service里面无效
- How to create (and deploy) a windows service in C# ?
- C# 编写Windows Service(windows服务程序)
- 64位windows下,C# 访问 Lotus Domino Objects 时访问Com注册类失败原因
- C#制作Windows service服务系列三--制作可控制界面的Windows服务(windows service)
- Create windows service using c#