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. NOIP2009多项式输出(水)【A004】

    [A004]潜伏者[难度A]—————————————————————————————————————————————————————————————————————————— [题目要求] 一元 n ...

  2. 3Sum——leetcode

    Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all un ...

  3. [MySQL]使用Begin...End语句的一个坑

    写一个触发器,执行单条语句是OK的. 想执行多条语句,尝试在代码中加入BEGIN END.但一加BEGIN END就报错, 错误信息也很诡异,只说某一行出错了,不符合Mysql的语句规范,提示信息就个 ...

  4. JavaScript中的this指向

    this是谁 技术一般水平有限,有什么错的地方,望大家指正. this代指当前对象super调用父类的构造函数,应表会运网数物,加载驱动建立链接执行SQL处理结果,直到现在每想起这三点就能想起我上大学 ...

  5. HTML5 标签audio添加网页背景音乐代码

    <head> <meta http-equiv="Content-Type" name="viewport" content="wi ...

  6. 洛谷 P1204 [USACO1.2]挤牛奶Milking Cows Label:模拟Ex 74分待查

    题目描述 三个农民每天清晨5点起床,然后去牛棚给3头牛挤奶.第一个农民在300秒(从5点开始计时)给他的牛挤奶,一直到1000秒.第二个农民在700秒开始,在 1200秒结束.第三个农民在1500秒开 ...

  7. 【BZOJ】3930: [CQOI2015]选数

    题意 从区间\([L, R]\)选\(N\)个数(可以重复),问这\(N\)个数的最大公约数是\(K\)的方案数.(\(1 \le N, K \le 10^9, 1 \le L \le R \le 1 ...

  8. ZeroMQ接口函数之 :zmq_proxy_steerable – 以STOP/RESUME/TERMINATE控制方式开启内置的ZMQ代理

    ZeroMQ API 目录 :http://www.cnblogs.com/fengbohello/p/4230135.html ——————————————————————————————————— ...

  9. JVM内存区域异常分析

    在Java虚拟机规范描述中,除程序计数器外,其他几个运行时区域都有可能发生OutOfMemoryError异常.接下来将对各区域分别进行分析介绍,内容包括触发各区域OutOfMemoryError异常 ...

  10. Daily Scrum02 12.07

    最近大家都在赶编译的大作业,没日没夜的码代码,调试,大家都很辛苦,但是,我们团队的工作,大家也不能懈怠啊! 大家要顶住压力,加油努力啊! Member 任务进度 下一步工作 吴文会 就总结点进行汇报 ...