zoukankan      html  css  js  c++  java
  • Windows手动添加服务 sc create

    命令行创建服务项: sc create

    用法:
    sc <server> create [service name] [binPath= ] <option1> <option2>...

    选项:
    注意: 选项名称包括等号,等号和值之间需要一个空格
    type= <own|share|interact|kernel|filesys|rec|userown|usershare>    (默认 = own)
    start= <boot|system|auto|demand|disabled|delayed-auto>              (默认 = demand)
    error= <normal|severe|critical|ignore>                                           (默认 = normal)
    binPath= <.exe 文件的 BinaryPathName>
    group= <LoadOrderGroup>
    tag= <yes|no>
    depend= <依存关系(以 / (斜杠)分隔)>
    obj= <AccountName|ObjectName>             (默认= LocalSystem)
    DisplayName= <显示名称>
    password= <密码>

    示例:将 Redis 添加到服务,以管理员身份运行命令提示符

    sc create Redis6.2.6 binPath= "D:\Redis6.2.6\redis-server.exe --service-run \"D:\Redis6.2.6\redis-windows.conf\"" DisplayName= Redis6.2.6 start= auto

    命令中的双引号使用反斜杠加引号 \" 来进行转义处理

    设置服务的描述: sc description

    用法:
    sc <server> description [service name] [description]

    示例:修改 Redis 描述

    sc description Redis6.2.6 "This service runs the Redis server"
  • 相关阅读:
    Yum安装Lamp环境
    Cacti系统监控安装
    源码安装Memcache
    Lamp源码编译+SVN安装
    分页数据列表写法
    文件单位转换函数
    Session写入到Memcache,Redis和数据库中
    [LeetCode#30]Substring with Concatenation of All Words
    快速创建php server
    Git skills in reseting files
  • 原文地址:https://www.cnblogs.com/kjcy8/p/15759974.html
Copyright © 2011-2022 走看看