"sc.exe create/delete" - Create or Delete Services
"sc.exe" can also be used to create and delete services. If you want to create a new service, you can use the "create" commanded offered by the sc.exe tool. Before running this command, you need to prepre the following minimum information:
- Service Name: A single word to name the new service.
- Binary Path: The path name where the executable program for new service is located.
- Dispaly Name: A short name for the new service.
Here is a tutorial example showing you how to create a service to run Apache Web server:
C:\herong>sc.exe create ApacheService
binPath= "C:\local\apache\bin\httpd.exe -k runservice"
DisplayName= "Apache Server" [SC] CreateService SUCCESS C:\herong>sc.exe start ApacheService SERVICE_NAME: ApacheService
TYPE : WIN32_OWN_PROCESS
STATE : START_PENDING
(NOT_STOPPABLE,NOT_PAUSABLE,IGNORES_SHUTDOWN)
WIN32_EXIT_CODE : (0x0)
SERVICE_EXIT_CODE : (0x0)
CHECKPOINT : 0x2
WAIT_HINT : 0x7530
PID :
FLAGS : C:\herong>sc.exe query ApacheService SERVICE_NAME: ApacheService
TYPE : WIN32_OWN_PROCESS
STATE : RUNNING
(STOPPABLE,NOT_PAUSABLE,IGNORES_SHUTDOWN)
WIN32_EXIT_CODE : (0x0)
SERVICE_EXIT_CODE : (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0 C:\herong>sc.exe stop ApacheService SERVICE_NAME: ApacheService
TYPE : WIN32_OWN_PROCESS
STATE : STOP_PENDING
(NOT_STOPPABLE,NOT_PAUSABLE,IGNORES_SHUTDOWN)
WIN32_EXIT_CODE : (0x0)
SERVICE_EXIT_CODE : (0x0)
CHECKPOINT : 0x4
WAIT_HINT : 0x7530 C:\herong>sc.exe delete ApacheService [SC] DeleteService SUCCESS C:\herong>sc.exe query ApacheService [SC] EnumQueryServicesStatus:OpenService FAILED :
The specified service does not exist as an installed service.
Note that I deleted the service at the end of the tutorial.
"sc.exe create/delete" - Create or Delete Services的更多相关文章
- Zookeeper常用操作命令create,set,delete
一.zk特性的session的基本原理 1.客户端与服务端之间的连接存在会话 2.每个会话都可以设置一个超时时间 3.心跳结束,session则过期 4.session过期,则临时节点znode会被抛 ...
- 如何删除windows服务(sc.exe删除和注册表删除两种方法)
一.什么是Windows服务 Windows服务也称为Windows Service,它是Windows操作系统和Windows网络的基础,属于系统核心的一部分,它支持着整个Windows的各种操作. ...
- sc.exe管理系统服务
sc.exe管理系统服务 下面介绍SC,SC QC,and SC QUERY sc.exe create HomerSatelliteDesktopGC binPath= "D:XXXXXX ...
- sc.exe用法详解
sc.exe是帮助开发 WindowsNT 服务的工具,这里我来说说如何使用好sc.exe. 我们打开命令提示符(以管理员身份运行): 输入sc delete ServiceName(服务名) 即可 ...
- 浅谈 C++ 中的 new/delete 和 new[]/delete[]
在 C++ 中,你也许经常使用 new 和 delete 来动态申请和释放内存,但你可曾想过以下问题呢? new 和 delete 是函数吗? new [] 和 delete [] 又是什么?什么时候 ...
- problem during schema create,statement create sequence act_evt_log_seq
今天在调试程序的时候出现"problem during schema create,statement create sequence act_evt_log_seq"这个错误,跟 ...
- 【转】浅谈 C++ 中的 new/delete 和 new[]/delete[]
在 C++ 中,你也许经常使用 new 和 delete 来动态申请和释放内存,但你可曾想过以下问题呢? new 和 delete 是函数吗? new [] 和 delete [] 又是什么?什么时候 ...
- [转] 浅谈 C++ 中的 new/delete 和 new[]/delete[]
转:http://www.cnblogs.com/hazir/p/new_and_delete.html 在 C++ 中,你也许经常使用 new 和 delete 来动态申请和释放内存,但你可曾想过以 ...
- PHP MySQL Delete From 之 Delete
删除数据库中的数据 DELETE FROM 语句用于从数据库表中删除记录. 语法 DELETE FROM table_name WHERE column_name = some_value 注释:SQ ...
随机推荐
- Bitwise Equations
Problem Description You are given two positive integers X and K. Return the K-th smallest positive i ...
- Android学习必备--java工具15个
Weka .Weka集成了数据挖掘工作的机器学习算法.这些算法可以直接应用于一个数据集上或者你可以自己编写代码来调用.Weka包括一系列的工具,如数据预处理.分类.回归.聚类.关联规则以及可视化. M ...
- Lucene Scoring 评分机制
原文出处:http://blog.chenlb.com/2009/08/lucene-scoring-architecture.html Lucene 评分体系/机制(lucene scoring)是 ...
- SSH整合报错:Unable to instantiate Action, testAction, defined for 'test' in namespace '/'testAction
报错如下: Struts Problem Report Struts has detected an unhandled exception: Messages: testAction Unable ...
- memcache+php实现页面访问的加速
一.什么是memcache memcache是目前主流的一个高性能的分布式内存对象缓存系统:它以key-value形式在内存中存储数据.由于数据缓存在内存中,所以相比操作DB而言,它不需要解析SQL. ...
- php session目录找不到的错误 Error session_start(): open(/var/lib/php/session error
问题来源 今天安装一个应用,发现提示 Error session_start(): open(/var/lib/php/session error,估计是找不到写不了啥啥啥. 于是我就去该路径下去看看 ...
- UVAlive5713 Qin Shi Huang's National Road System【次小生成树】【DP】
LINK1 LINK2 题目大意 给你平面上的n个点 每个点有一个权值 让你求出一个生成树 可以选择一条边不花费代价 要最大化这条边两边端点的权值/剩下n-2条边的长度之和 思路 发现发现其实端点权值 ...
- 使用ajax提交form表单,包括ajax文件上传 转http://www.cnblogs.com/zhuxiaojie/p/4783939.html
使用ajax提交form表单,包括ajax文件上传 前言 使用ajax请求数据,很多人都会,比如说: $.post(path,{data:data},function(data){ ... },&qu ...
- jQuery因mouseover,mouseout冒泡产生的闪烁问题
由于浏览器的冒泡行为.造成如果在一个DIV元素上同时定义了mouseover,mouseout的时候,当鼠标移动到DIV中的child子元素的时候,就会同时执行了两个操作mouseover和mouse ...
- pthread调度策略,优先级和竞争范围
实时调度:操作系统在有限的时间内提供特定水平的服务能力.受限制的响应时间不一定是块的反应,意味着可预知的响应速度.如果系统定义_POSIX_THRAED_PRIORITY_SCHEDULING,它为线 ...