"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 ...
随机推荐
- Can't create session svn: Unable to connect to a repository at URL “...”的解决方案
Can't create sessionsvn: Unable to connect to a repository at URL '...' Cannot negotiate authenticat ...
- easyui combobox 动态加载数组数据
怕自己忘了,记录下来以后用方便 html部分 <input id="rzcode" name="businesItemId" style="wi ...
- 身份证&银行卡识别方案
一. 调用第三方服务 腾讯云OCR识别: 实现方法:Post图片 URL到腾讯云服务器.Post图片文件 到腾讯云服务器 b. 报价: 月接口调用总量 0<调用量≤1000 1000&l ...
- Vue2.0 less全局配置
前言 再一次vue2.0的开发中,遇到这样的一个问题,使用less与处理器,封装了一套关于项目的主题,但是使用的时候,main.js中引入后依然不能直接使用定义的@theme-bg等less定义的颜色 ...
- 2065212Java实验四android开发基础
20165212 Java实验四Android开发基础 实验内容: 1.基于Android Studio开发简单的Android应用并部署测试; 2.了解Android.组件.布局管理器的使用: 3. ...
- C# 4.0中的动态类型和动态编程
# 4.0的主题就是动态编程(Dynamic Programming).虽然C#仍然是一种静态语言,但是对象的意义开始变得越来越“动态”.它们的结构和行为无法通过静态类型来捕获,或者至少编译器在编译程 ...
- oracle10g精简版安装步骤
Feng218 假设出现例如以下错误: 最好把360安全卫士全关了.再安装下.就没事了 然后安装完了进入时输入username:sys或者system password就是自己设好的passwo ...
- bzoj1013球形空间
题目:https://www.lydsy.com/JudgeOnline/problem.php?id=1013 根据距离式子,两个点的话,两边平方再消掉x^2之后有: a1^2 - 2*a1*x1 ...
- PHP 通过实现 Iterator(迭代器)接口来读取大文件文本
读了NGINX的access日志,bnb_manage_access.log(31M) 和 bnb_wechat_access.log(50M) 附上代码: <?php /** * User: ...
- NLTK在自然语言处理
nltk-data.zip 本文主要是总结最近学习的论文.书籍相关知识,主要是Natural Language Pracessing(自然语言处理,简称NLP)和Python挖掘维基百科Infobox ...