Part One-Add:

Step4: Add the new service to windows service:

$commandLine = 'D:\IMS\2.16.0.42-DataServices\Service\Eze.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 programa\MySQL\MySQL Server 5.1\bin\mysqld.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

Add&Delete WindowService的更多相关文章

  1. How to Programmatically Add/Delete Custom Options in Magento? - See more at: http://apptha.com/blog/

    In this tutorial, I would like to help out Magento developers and clients with how to programmatical ...

  2. 2016/3/26 连接数据库 网页中数据的增删改 add delete update addchuli updateChuLi test8 DBDA

    主页面 test8.php <!DOCTYPE html> <html lang="en"> <head> <meta charset=& ...

  3. svn一次性add/delete所有文件

    Linux命令行下,svn add 一次性批量上传 命令行下操作svn没有使用界面形式的TortoiseSVN直观,但是不管怎样,命令行下操作svn还是有它的有点,如果你碰到一次需要svn add许多 ...

  4. Maste Note for OCR / Vote disk Maintenance Operations (ADD/REMOVE/REPLACE/MOVE)

    Doc ID 428681.1 Applies to: Oracle Database - Enterprise Edition - Version 10.2.0.1 to 11.2.0.1.0 [R ...

  5. stark组件之delete按钮、filter过滤

    1.构建批量删除按钮 2.filter过滤 3.总结+coding代码 1.构建批量删除按钮 1.admin中每个页面默认都有 2.stark之构建批量删除 3.coding {% extends ' ...

  6. 11 stark组件之delete按钮、filter过滤

    1.构建批量删除按钮 1.admin中每个页面默认都有 2.stark之构建批量删除 3.coding {% extends 'base.html' %} {% block title %} < ...

  7. Delphi中的ADOquery 用法以及ADOquery的自有方法Append 和Delete和 Edit 和Post

    Delphi在数据库操作是非常好用的,delphi把ADO一些方法属性都集成了,以下是我的一些总结:*******************************通过sql的存储过程来实现:添加Wit ...

  8. hbase 2.0.2 put和delete的一些坑

    测试的inbox表为多版本表,封装的scanTable已设置查询全部版本,以下的测试基于hbase2.0.2 一.put(针对相同的rowkey) 测试1.使用方法链的形式对同一个put添加数据到不同 ...

  9. PHP之购物车的代码

    该文章记录了购物车的实现代码,仅供参考 book_sc_fns.php <?php include_once('output_fns.php'); include_once('book_fns. ...

随机推荐

  1. Android_ListView简单例子

    ListView是Android软件开发中非常重要组件之一,基本上是个软件基本都会使用ListView ,今天我通过一个demo来教大家怎么样使用ListView组件 activity_main.xm ...

  2. 读取EXCEL数据到内存DataTable

    protected void Page_Load(object sender, EventArgs e) { string filepath = Server.MapPath("~/file ...

  3. 借鉴dubbo实现自定义缓存

    自定义缓存一般基于ConcurrentMap实现,实现缓存需要注意的点是缓存容器对象 本身依赖于 static final去存储对象,样例: ConcurrentMap<String, Gene ...

  4. three.js材质

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xht ...

  5. 【原】iOS学习之UIApplication及其代理

    1. 什么是UIApplication UIApplication 对象是应用程序的象征,不能手动创建,不能 alloc init,一个应用程序只允许 一个 . 每个应用都有自己的 UIApplica ...

  6. 使用功能强大的插件FastReport.Net打印报表实例

    我第一次使用FastReport插件做的功能是打印一个十分复杂的excel表格,有几百个字段都需要绑定数据,至少需要4个数据源,而且用到横向.竖向合并单元格. 我不是直接连接数据库,而是使用Regis ...

  7. Windows Phone Sliding Effect

    <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0" Backgro ...

  8. php 获取域名等Url

    <?php //获取域名或主机地址 echo $_SERVER['HTTP_HOST']."<br />"; //获取网页地址 echo $_SERVER['PH ...

  9. 授权其他数据库用户kill session

    授权其他数据库用户kill session kill session权限 CREATE OR REPLACE PROCEDURE P_KILL_SESSION(P_USER IN VARCHAR2, ...

  10. C#网络编程之---TCP协议的同步通信(二)

    上一篇学习日记C#网络编程之--TCP协议(一)中以服务端接受客户端的请求连接结尾既然服务端已经与客户端建立了连接,那么沟通通道已经打通,载满数据的小火车就可以彼此传送和接收了.现在让我们来看看数据的 ...