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

  1. 点击左下角的开始按钮,按如下顺序“开始 - Visual Studio 2012 - Visual Studio Tools - Developer Command Prompt  for VS2012”,打开一个命令窗口
  2. runas /user:Administrator cmd
  3. 提示输入该用户名的密码,按要求输入( 输入的密码无任何显示)
  4. 密码输入正确后,新开一个cmd窗口,标题是cmd(作为Myname运行)
  5. 输入命令: installutil.exe Myservice.exe 如果安装成功,则直接显示命令提示符,没有任何信息;如果安装不成功,则会有信息出现
  6. 管理 -  服务 ,可以找到服务“Myservice” 点击启动
C:\windows\system32>runas /user:cn-hr@outlook.com cmd
输入 cn-hr@outlook.com 的密码:
试图将 cmd 作为用户 "cn-hr@outlook.com" 启动...

2、InstallUtil.exe可以单独运行,

卸载Windows服务,使用/u参数即可。命令为:

installutil /u Myservice.exe

  runas /user:cn-hr@outlook.com cmd

 C:\Windows\WinSxS\amd64_installutil_b03f5f7f11d50a3a_6.3.9600.20708_none_3801968eea5f295e\InstallUtil.exe D:\Development\IM\LanMsg4public\LanMsgService\bin\LanMsgService.exe

 C:\Windows\WinSxS\x86_installutil_b03f5f7f11d50a3a_6.3.9600.16384_none_9684d201e52c559f\InstallUtil.exe D:\Development\IM\LanMsg4public\LanMsgService\bin\LanMsgService.exe

  "C:\Windows\Microsoft.NET\Framework\v4.0.30319\InstallUtil.exe D:\Development\IM\LanMsg4public\LanMsgService\bin\LanMsgService.exe

 "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\InstallUtil.exe D:\Development\IM\LanMsg4public\LanMsgService\bin\LanMsgService.exe

 "C:\Windows\Microsoft.NET\Framework64\v2.0.50727\InstallUtil.exe D:\Development\IM\LanMsg4public\LanMsgService\bin\LanMsgService.exe

 "C:\Windows\Microsoft.NET\Framework\v2.0.50727\InstallUtil.exe D:\Development\IM\LanMsg4public\LanMsgService\bin\LanMsgService.exe

 C:\Windows\Microsoft.NET\Framework\v2.0.50727\InstallUtil.exe D:\Development\IM\OurMsg2.3.5.\Server\Bin\OurMsgService.exe"

 C:\Windows\Microsoft.NET\Framework\v2.0.50727\InstallUtil.exe D:\Development\IM\OurMsg2.3.5.\Server\Bin\OurMsgServer.exe"

使用InstallUtil对Windows服务进行安装与卸载的更多相关文章

  1. windows 服务的安装与卸载之bat脚本命令

    在windows 平台下,服务的安装与卸载可通过bat 脚本命令来完成,同时可编辑服务的描述,具体代码如下: 1.服务的安装DynamicPlanService_installer.bat: @ech ...

  2. C#操作windows服务,安装、卸载、停止、启动

    public class ServiceUtil { private string _ServiceName = string.Empty; private string _AppName = str ...

  3. Windows服务一:新建Windows服务、安装、卸载服务

    Windows 服务(即,以前的 NT 服务)使您能够创建在它们自己的 Windows 会话中可长时间运行的可执行应用程序.这些服务可以在计算机启动时自动启动,可以暂停和重新启动而且不显示任何用户界面 ...

  4. Windows Service 学习系列(二):C# windows服务:安装、卸载、启动和停止Windows Service几种方式

    一.通过InstallUtil.exe安装.卸载.启动.停止Windows Service 方法一 1.以管理员身份运行cmd 2.安装windows服务 切换cd C:\Windows\Micros ...

  5. 简单的Windows 服务的安装和卸载

    步骤: 1.运行--〉cmd:打开cmd命令框 2.在命令行里定位到InstallUtil.exe所在的位置 InstallUtil.exe 默认的安装位置是在C:/Windows/Microsoft ...

  6. Windows服务的安装、卸载

    创建一个Windows服务 http://jingyan.baidu.com/article/fa4125acb71a8628ac709226.html 安装服务 使用FramWork框架自带的Ins ...

  7. C# Windows服务的安装和卸载批处理

    @ECHO "请按任意键开始安装后台服务. . ."@ECHO "清理原有服务项. . ."%SystemRoot%\Microsoft.NET\Framewo ...

  8. C#.NET 操作Windows服务(安装、卸载)

    注意点: 1.安装时要请求到管理员权限. 2.卸载前,一定要停止掉Windows服务,否则需要重启或注销电脑.代码无法停止服务时,使用services.msc来停止. 开始: 1.新建一个名为&quo ...

  9. windows 服务的安装与卸载

    卸载服务 Cmd 执行 Sc delete axXinkong(服务名称) 安装服务

随机推荐

  1. Oracle基础 04 归档日志 archivelog

    --查看归档模式archive log list select log_mode from v$database; --修改为归档模式(mount下)alter database archivelog ...

  2. ECharts问题--柱状图和折线图中xAxis.data为空时报错问题解决

    1. 我们在日常的开发中使用Echarts时,不像在学习的过程中是自己在option中的配置项填写图表需要的参数,而是通过ajax请求后台,获取数据后,使用javascript来动态的修改数据,但是有 ...

  3. 存储过程 ----- navicat 创建存储过程

    以下为navicat 创建存储过程步骤图解: 1. 2. 3. 4. 在存储过程正文中是输入一行语句测试用,点击保存 5.输入存储过程名称,点击确定 6.到这来那么问题来了,会提示错误 7.切记存储过 ...

  4. 取消SecureCRT的右击粘贴功能

    默认为选中时自动复制,右键粘贴 要取消的话在: Options->Global Options ...->Terminal 里面有个Mouse的选项块. Paste on Right/Le ...

  5. Mysql快速导出导入数据的实验

    一.创建测试数据库 CREATE database example; use example; create TABLE `user` ( `id` ) NOT NULL, `last_name` v ...

  6. ionic3 学习记录

    1生命周期 ionViewDidLoad(){ console.log("1.0 ionViewDidLoad 当页面加载的时候触发,仅在页面创建的时候触发一次,如果被缓存了,那么下次再打开 ...

  7. 【转】python 生成器和迭代器有这篇就够了

    总结得特别好,转自:https://www.cnblogs.com/wj-1314/p/8490822.html 本节主要记录一下列表生成式,生成器和迭代器的知识点 列表生成器 首先举个例子 现在有个 ...

  8. usaco1.4.3等差数列

    为这道苟题鼓掌 题目: 一个等差数列是一个能表示成a, a+b, a+2b,…, a+nb (n=0,1,2,3,…)的数列.在这个问题中a是一个非负的整数,b是正整数.写一个程序来找出在双平方数集合 ...

  9. 一种可以做app性能监控的app

    http://easytest.taobao.com/?spm=0.0.0.0.ljgQHN

  10. Scrum之成败——从自身案例说起,仅供参考

    从07年中初次接触Scrum的概念到其中几年项目中逐渐实践CI.TDD,到亲自掌握项目实践Scrum近一年,最终我们放弃了Scrum这个框架和所谓的“自组织”.原因为何? 1.成员放弃了Scrum所“ ...