要安装windows service 首先要找到 InstallUtil.exe,InstallUtil.exe位置在 C:\Windows\Microsoft.NET\Framework\v4.0.30319,用什么版本写的服务,找到对应版本,各个版本不同详见(C:\Windows\Microsoft.NET\Framework\版本)

然后使用命令

安装服务

InstallUtil.exe  服务路径/windowsServiceName.exe

快捷安装:直接找到对应的 installutil.exe,拖cmd中,再拖你服务的位置路径下的服务名称.exe,(win10 以上系统支持)

启动该服务

net start windowsServiceName

停止服务

net stop windowsServiceName

卸载服务

InstallUtil.exe /u 服务路径/windowsServiceName.exe

InstallUtil操作WindowsService的更多相关文章

  1. C# 编写Window服务基础(一)

    一.Windows服务介绍: Windows服务以前被称作NT服务,是一些运行在Windows NT.Windows 2000和Windows XP等操作系统下用户环境以外的程序.在以前,编写Wind ...

  2. windows服务部署

    1.新建windows服务项目 2.编辑业务代码 我这里只写2句记录文本的测试代码 using System; using System.IO; using System.ServiceProcess ...

  3. 如何为Windows服务增加Log4net和EventLog的日志功能。

    一.简介 最近在做一个项目的时候,需要该项目自动启动.自动运行,不需要认为干预.不用说,大家都知道用什么技术,那就是 Windows服务.在以前的Net Framework 平台下,Windows 服 ...

  4. windows服务异常值framework版本

    sc query WCService | find /i "state"if %errorlevel% == 0 ( net start "WCService" ...

  5. 任务调度Quartz.Net之Windows Service

    这个应该是关于Quartz.Net使用的最后一篇文章了,之前的介绍都是基于Web的,这种实现任务调度的方式很少见,因为不管是MVC.WebApi还是WebService,它们都需要寄宿在IIS上运行, ...

  6. [WCF] - 使用 bat 批处理文件将 WCF 服务部署为 Windows Service

    1. 添加 Windows Service 项目 2. 添加 WCF 项目引用 3. 更新 App.config 配置文件(可以从 WCF的 Web.config 拷贝过来),设置服务地址. 4. 配 ...

  7. C# WindowService 安装和卸载

    安装脚本 install.bat 内容 @echo 安装WindowService%SystemRoot%\Microsoft.NET\Framework\v2.0.50727\installutil ...

  8. WCF寄宿windows服务一

    如果只是寄宿单个wcf服务,方法很简单,步骤:1.创建好一个windows服务.关于windows服务内容见:http://www.cnblogs.com/zhaow/p/7866916.html2. ...

  9. 使用InstallUtil安装及卸载Windows服务的具体操作 Visual Studio 2012版本

    关于Visual Studio 2012中使用InstallUtil对Windows服务进行安装与卸载的文章,在MSDN中的http://msdn.microsoft.com/en-us/librar ...

随机推荐

  1. poj2559/hdu1506 单调栈经典题

    我实在是太菜了啊啊啊啊啊 到现在连个单调栈都不会啊啊啊 写个经典题 #include<cstdio> #include<algorithm> #include<cstri ...

  2. Js调用asp.net后台代码

    方法一:         1.首先建立一个按钮,在后台将调用或处理的内容写入button_click中; 2.在前台写一个js函数,内容为document.getElementById("b ...

  3. python2 编码与解码

    #!coding: utf-8 s = "特斯拉" s_to_unicode = s.decode("utf-8") unicode_to_gbk = s_to ...

  4. element-ui组件中时间选择器设置时间禁用

    DateTimePicker 日期时间选择器 组件代码 <el-date-picker v-model="value1" type="datetime" ...

  5. Http 持久连接与 HttpClient 连接池

    一.背景 HTTP协议是无状态的协议,即每一次请求都是互相独立的.因此它的最初实现是,每一个http请求都会打开一个tcp socket连接,当交互完毕后会关闭这个连接. HTTP协议是全双工的协议, ...

  6. 自动化测试平台的搭建--Jenkins

    1.下载:进入官网https://jenkins.io/download/,直接下载war包(约70M): 2.将下载好的war包直接放入到tomcat/webapp下: 3.进入bin目录下启动服务 ...

  7. Log4Net配置日志

    1.log4net 1)新建一个Net空白项目,在引用出点击管理NuGet程序包,搜索log4net并安装 2)建立log4net.config配置文件 在configuration里面添加如下代码, ...

  8. oracle启用异步IO(db file async I/O submit)

    市局双随机awr报告中有大量db file async I/O submit等待事件 参考两篇文章: [案例]Oracle等待事件db file async I/O submit产生原因和解决办法 d ...

  9. mysql进制之间的转换

    1.十进制转换成二进制 select bin(5); 2.十进制转换成八进制 select oct(5); 3.十进制转换成十六进制 select hex(5); 4.二进制转换成十进制 select ...

  10. python序列化模块的速度比较

    # -*- coding: utf-8 -*- # @Time : 2019-04-01 17:41 # @Author : cxa # @File : dictest.py # @Software: ...