zoukankan      html  css  js  c++  java
  • svn sc create 命令行创建服务自启动


    今天重装了系统,Subversion服务也得重装。照例输入代码:

    sc create svnserve binpath="d:PortableAppssvnsvnserve.exe --service -r e:svn" displayname="Subversion" depend=tcpip start=auto
    

    可是居然出现了下面的提示:

    D:PortableAppssvn>sc create svnserve binpath="d:PortableAppssvnsvnserve.exe
     --service -r e:svn" displayname="Subversion" depend=tcpip start=auto
    Creates a service entry in the registry and Service Database.
    SYNTAX:
    sc create [service name] [binPath= ]  ...
    CREATE OPTIONS:
    NOTE: The option name includes the equal sign.
     type= <own|share|interact|kernel|filesys|rec>
           (default = own)
     start= <boot|system|auto|demand|disabled>
           (default = demand)
     error= <normal|severe|critical|ignore>
           (default = normal)
     binPath= 
     group= 
     tag= <yes|no>
     depend= <dependencies(separated by="" (forward="" slash))="">
     obj= <accountname|objectname>
           (default = LocalSystem)
     DisplayName= 
     password= 
    

    我仔细检查注册表,没有同名的服务啊!浪费了半小时,才搞清楚,binpath=、dispalyname=、depend=后面是必须要有一个空格的。否则就会执行不成功。这语法,太奇怪了……
    所以,正确的代码应该是这样:

    sc create svnserve binpath= "d:PortableAppssvnsvnserve.exe --service -r e:svn" displayname= "Subversion" depend= tcpip start= auto
    

    那么,原来我是怎么执行成功的呢?仔细想了想,以前的代码是直接从SVN帮助中复制的 :em23:

    from: http://zengrong.net/post/457.htm

  • 相关阅读:
    JVM系列六(自定义插入式注解器).
    JVM系列五(Javac 字节码编译器).
    2019 — 求不得,放不下
    Mybatis 条件判断单双引号解析问题
    JVM系列四(对象分配策略).
    JVM系列三(垃圾收集器).
    Spring MVC -- Spring Tool Suite和Maven(安装Tomcat、JDK)
    Spring MVC -- 单元测试和集成测试
    Spring MVC -- 下载文件
    Spring MVC -- 上传文件
  • 原文地址:https://www.cnblogs.com/xuan52rock/p/4994032.html
Copyright © 2011-2022 走看看