老E的博客

  • 首页
  • 关于
  • 技术应用
    • VPS相关
    • AI相关
    • 盒子相关
    • 其他
  • 订阅Youtube频道
  • 网络加速
    • expressvpnNo.1 ExpressVPN
    • 最佳免费VPN-PrivadoVPN
    • NordVPN
    • 廉价王者-Surfshark
    • PrivateInternetAccess
    • 解锁一切-PrivateVPN
  • 公益资源
    • AI导航
    • 工具下载
    • Docker镜像加速
  • 友情链接
    • tickcloudTickcloud
老E的博客
专注记录并分享跨境技术应用及随想
  1. 首页
  2. 技术应用
  3. 其他
  4. 正文

Windows下的sc工具应用

2023年8月3日 1496次阅读 0条评论
clawcloud
expressvpn best vpn
privado vpn
surfshark vpn
private vpn
pia vpn
nord vpn

sc是NT 4.0时代就有的系统工具,最早附于Resource Kit中,主要用于安装、启动、配置、关闭、删除windows服务。在cmd终端窗口输入sc即可获取详细信息。以下为节选的主要内容:

C:\Users\appsc>sc
描述:
SC 是用来与服务控制管理器和服务进行通信
的命令行程序。
用法:
sc [command] [service name]...

选项的格式为 "\\ServerName"
可通过键入以下命令获取有关命令的更多帮助: "sc [command]"
命令:
start-----------启动服务。
stop------------向服务发送 STOP 请求。
config----------更改服务的配置(永久)。
delete ----------(从注册表中)删除服务。
create----------创建服务(并将其添加到注册表中)。

1.sc create

sc.exe [<servername>] create [<servicename>] [type= {own | share | kernel | filesys | rec | interact type= {own | share}}] [start= {boot | system | auto | demand | disabled | delayed-auto}] [error= {normal | severe | critical | ignore}] [binpath= <binarypathname>] [group= <loadordergroup>] [tag= {yes | no}] [depend= <dependencies>] [obj= {<accountname> | <objectname>}] [displayname= <displayname>] [password= <password>]

servername指定服务所在的远程服务器,本地使用不指定。servicename指定服务名称。“type=”指定服务类型,默认值为own,即在自己的进程中运行的服务。 “start=”指定服务的启动类型,默认值为demand,可指定为auto;“binpath=”指定服务二进制文件的路径,“binpath= ”没有默认值,必须提供此字符串。

2.sc config

sc.exe [<servername>] config [<servicename>] [type= {own | share | kernel | filesys | rec | adapt | interact type= {own | share}}] [start= {boot | system | auto | demand | disabled | delayed-auto}] [error= {normal | severe | critical | ignore}] [binpath= <binarypathname>] [group= <loadordergroup>] [tag= {yes | no}] [depend= <dependencies>] [obj= {<accountname> | <objectname>}] [displayname= <displayname>] [password= <password>]

3.sc start /  stop

sc start和sc stop分别用于启动、停止服务,sc [ start | stop ] <<servicename>。

4.sc delete

sc.exe [<servername>] delete [<servicename>]

sc工具常用的命令/command主要就是以上几项,“displayname= ”、“password= ”两项命令也有应用。

本作品采用 知识共享署名-非商业性使用-禁止演绎 4.0 国际许可协议 进行许可
标签: windows sc
最后更新:2024年5月27日

webmaster

这个人很懒,什么都没留下

点赞
< 上一篇
下一篇 >

文章评论

razz evil exclaim smile redface biggrin eek confused idea lol mad twisted rolleyes wink cool arrow neutral cry mrgreen drooling persevering
取消回复

站内搜索
归档
  • 2025 年 5 月
  • 2025 年 4 月
  • 2025 年 3 月
  • 2025 年 2 月
  • 2025 年 1 月
  • 2024 年 12 月
  • 2024 年 11 月
  • 2024 年 10 月
  • 2024 年 9 月
  • 2024 年 8 月
  • 2024 年 7 月
  • 2024 年 6 月
  • 2024 年 5 月
  • 2024 年 4 月
  • 2024 年 3 月
  • 2024 年 2 月
  • 2024 年 1 月
  • 2023 年 12 月
  • 2023 年 11 月
  • 2023 年 10 月
  • 2023 年 9 月
  • 2023 年 8 月
  • 2023 年 7 月
  • 2023 年 6 月

Copyright ©2023-2025 Appscross. All Rights Reserved.