using System.Collections;
using System.Configuration.Install;
using System.ServiceProcess;
using System.ComponentModel;namespace WindowsService1
{
/// <summary>
/// myInstall 的摘要说明。
/// </summary>
///
[RunInstaller(true)]
public class myInstall : Installer
{
private ServiceInstaller serviceInstaller;
private ServiceProcessInstaller processInstaller;
public myInstall()
{
processInstaller = new ServiceProcessInstaller();
serviceInstaller = new ServiceInstaller(); processInstaller.Account = ServiceAccount.LocalSystem;
serviceInstaller.StartType = ServiceStartMode.Automatic;
serviceInstaller.ServiceName = "WindowsService1"; Installers.Add(serviceInstaller);
Installers.Add(processInstaller);
}
}
}windows服务安装类代码
原创
©著作权归作者所有:来自51CTO博客作者biyusr216的原创作品,请联系作者获取转载授权,否则将追究法律责任
上一篇:在.NET客户端程序中应用多线程
下一篇:C#线程处理
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
windows服务安装
安装,我们要用到这个程序,这个程序位于:.点击开始菜单,选择“运行”,在运行对话框中输入cmd,进入到命令行
批处理文件 可执行程序 条件编译 -
Windows群集服务安装
链接地址:[url]http://waringid.blog.51cto.com/65148/47213[/url]
职场 Windows 休闲 群集服务
















