zoukankan      html  css  js  c++  java
  • 使用InstallUtil对Windows服务进行安装与卸载

    关于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:windowssystem32>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

     1  runas /user:cn-hr@outlook.com cmd
     2 
     3 C:WindowsWinSxSamd64_installutil_b03f5f7f11d50a3a_6.3.9600.20708_none_3801968eea5f295eInstallUtil.exe D:DevelopmentIMLanMsg4publicLanMsgServiceinLanMsgService.exe
     4 
     5 
     6 
     7 C:WindowsWinSxSx86_installutil_b03f5f7f11d50a3a_6.3.9600.16384_none_9684d201e52c559fInstallUtil.exe D:DevelopmentIMLanMsg4publicLanMsgServiceinLanMsgService.exe
     8 
     9  "C:WindowsMicrosoft.NETFrameworkv4.0.30319InstallUtil.exe D:DevelopmentIMLanMsg4publicLanMsgServiceinLanMsgService.exe
    10 
    11 
    12 "C:WindowsMicrosoft.NETFramework64v4.0.30319InstallUtil.exe D:DevelopmentIMLanMsg4publicLanMsgServiceinLanMsgService.exe
    13 
    14 "C:WindowsMicrosoft.NETFramework64v2.0.50727InstallUtil.exe D:DevelopmentIMLanMsg4publicLanMsgServiceinLanMsgService.exe
    15 
    16 "C:WindowsMicrosoft.NETFrameworkv2.0.50727InstallUtil.exe D:DevelopmentIMLanMsg4publicLanMsgServiceinLanMsgService.exe
    17 
    18 C:WindowsMicrosoft.NETFrameworkv2.0.50727InstallUtil.exe D:DevelopmentIMOurMsg2.3.5.6ServerBinOurMsgService.exe"
    19 
    20 
    21 
    22 C:WindowsMicrosoft.NETFrameworkv2.0.50727InstallUtil.exe D:DevelopmentIMOurMsg2.3.5.6ServerBinOurMsgServer.exe"
  • 相关阅读:
    Java 堆和栈 垃圾回收 2015/9/16
    多态 Java 2015/9/16
    学校项目过程中知识点 Java 2015/9/15 晚
    Python print输出不换行
    Windows 加载EXT分区
    RouterOS 安全模式
    RouterOS Openswan l2tp ipsec
    RouterOS 自动邮件备份脚本
    python chnroutes ROS版
    Kinect 2.0&Speech 11 中文语音控制
  • 原文地址:https://www.cnblogs.com/endv/p/4623396.html
Copyright © 2011-2022 走看看