zoukankan      html  css  js  c++  java
  • Add&Delete WindowService

    Part One-Add:

    Step4: Add the new service to windows service:

    $commandLine = 'D:IMS2.16.0.42-DataServicesServiceEze.Shell.exe -r=ziyezhang_22'

    New-Service -Name 'EzeImsService_22_test' -BinaryPathName $commandLine -StartupType Automatic

    Part-Two Delete:

    ref:http://www.cnblogs.com/liuzhendong/archive/2011/05/12/2044629.html

    How to delete a windows service 
     

    Recently, I was trying to delete a windows service. Normally it should not be necessary to manually delete a service. Uninstalling an application should remove its associated service (if any).

    However, I installed some beta products and a service created by one of the applications was not removed automatically. Its very easy to remove a service from registry if you know the right path. Here is how I did that:

    1. Run Regedit or Regedt32
    2. Find the registry entry "HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services"
    3. Look for the service there and delete it. You can look at the keys to know what files the service was using and delete them as well (if necessary).

    alternatively, you can also use command prompt and delete a service using following command:

    sc delete < SERVICE name>

    or to create, simply type 
    sc create <SERVICE name>

    Update: 
    If you have space in the file path you need to use quotation marks ("). For example: 
    sc create "MySQL" binpath= "C:Archivos de programaMySQLMySQL Server 5.1inmysqld.exe"

    Thanks to Maya.

    NOTE: You may have to reboot the system to get the list updated in service manager.

    原文: http://geekswithblogs.net/shahedul/archive/2006/10/13/93984.aspx

  • 相关阅读:
    关于ajax入门案例
    关于idea maven工程创建struts2入门配置及案例
    hibernate关于多对多注解配置
    hibernate关于一对一注解配置
    hibernate批量处理数据
    HQL链接查询
    关于hibernate组件配置
    VS2010 项目属性的默认包含路径设置方法
    VC++的全局变量(转)
    调用文字在位编辑器
  • 原文地址:https://www.cnblogs.com/purple1/p/4498358.html
Copyright © 2011-2022 走看看