Add&Delete WindowService
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的更多相关文章
- 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 ...
- 2016/3/26 连接数据库 网页中数据的增删改 add delete update addchuli updateChuLi test8 DBDA
主页面 test8.php <!DOCTYPE html> <html lang="en"> <head> <meta charset=& ...
- svn一次性add/delete所有文件
Linux命令行下,svn add 一次性批量上传 命令行下操作svn没有使用界面形式的TortoiseSVN直观,但是不管怎样,命令行下操作svn还是有它的有点,如果你碰到一次需要svn add许多 ...
- 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 ...
- stark组件之delete按钮、filter过滤
1.构建批量删除按钮 2.filter过滤 3.总结+coding代码 1.构建批量删除按钮 1.admin中每个页面默认都有 2.stark之构建批量删除 3.coding {% extends ' ...
- 11 stark组件之delete按钮、filter过滤
1.构建批量删除按钮 1.admin中每个页面默认都有 2.stark之构建批量删除 3.coding {% extends 'base.html' %} {% block title %} < ...
- Delphi中的ADOquery 用法以及ADOquery的自有方法Append 和Delete和 Edit 和Post
Delphi在数据库操作是非常好用的,delphi把ADO一些方法属性都集成了,以下是我的一些总结:*******************************通过sql的存储过程来实现:添加Wit ...
- hbase 2.0.2 put和delete的一些坑
测试的inbox表为多版本表,封装的scanTable已设置查询全部版本,以下的测试基于hbase2.0.2 一.put(针对相同的rowkey) 测试1.使用方法链的形式对同一个put添加数据到不同 ...
- PHP之购物车的代码
该文章记录了购物车的实现代码,仅供参考 book_sc_fns.php <?php include_once('output_fns.php'); include_once('book_fns. ...
随机推荐
- android控件 ToggleButton的应用
ToggleButton是android给我们提供的开关按钮, 有两种状态:选中和未选择状态. 以下是代码实例: main.xml [html] view plain copy <?xml ve ...
- 关于datatime 时间处理模块:
import time from datetime import datetime from datetime import timedelta aHour= ...
- SQL注入攻防入门详解(2)
SQL注入攻防入门详解 =============安全性篇目录============== 毕业开始从事winfrm到今年转到 web ,在码农届已经足足混了快接近3年了,但是对安全方面的知识依旧薄弱 ...
- substr 与 substring 的区别
substr (start[, 所要子川的长度]); substring(start, 结束的位置)
- Linux用户密码重置方法
方法一: 启动时,随便按一个键,空格即可(不能是回车),让其停留在如下界面 按e编辑 在UTF-8后面添加init=/bin/sh init=/bin/sh 根据上面提示,按Ctrl+x启动得下图 输 ...
- ZeroMQ接口函数之 :zmq_null - 无安全和加密
ZeroMQ 官方地址 :http://api.zeromq.org/4-2:zmq_null zmq_null(7) ØMQ Manual - ØMQ/4.1.0 Name zmq_null - 无 ...
- osg 示例程序解析之osgdelaunay
osg 示例程序解析之osgdelaunay 转自:http://lzchenheng.blog.163.com/blog/static/838335362010821103038928/ 本示例程序 ...
- 动态调用WebService(C#) (非常实用)
通常我们在程序中需要调用WebService时,都是通过“添加Web引用”,让VS.NET环境来为我们生成服务代理,然后调用对应的Web服务.这样是使工作简单了,但是却和提供Web服务的URL.方法名 ...
- IOS网络第五天 AFN-03-监控网络状态
******* #import "HMViewController.h" #import "AFNetworking.h" @interface HMViewC ...
- 配置Office 365单点登录摘要
O365: 如果O365账号之前做过测试,则停用同步,强制删除已有用户涉及命令:Remove-MsolUser -UserPrincipalName zhang_san@company.cn (-Re ...