Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/batch-file/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Windows 将robocopy作为服务启动_Windows_Batch File_Cm - Fatal编程技术网

Windows 将robocopy作为服务启动

Windows 将robocopy作为服务启动,windows,batch-file,cm,Windows,Batch File,Cm,我不知道我做错了什么,因为命令在命令行中运行得很好,但在文件中却没有。我还尝试了多个来源和目的地,所以我认为这是问题所在,但我想现在不是了。有人能帮我吗?我迷路了 :: :: Robocopy Job C:\Users\sean\Documents\startup.rcj :: :: Created by sean on Thursday, May 25, 2017 at 7:56:19 AM :: :: :: Source Directory : :: /SD:F:\samplesh

我不知道我做错了什么,因为命令在命令行中运行得很好,但在文件中却没有。我还尝试了多个来源和目的地,所以我认为这是问题所在,但我想现在不是了。有人能帮我吗?我迷路了

::
:: Robocopy Job C:\Users\sean\Documents\startup.rcj
::
:: Created by sean on Thursday, May 25, 2017 at 7:56:19 AM
::

::
:: Source Directory :
::
    /SD:F:\samplesh :: Source Directory.

::
:: Destination Directory :
::
    /DD:D:\samplesh :: Destination Directory.


::
:: Include These Files :
::
    /IF     :: Include Files matching these names
::      *.* :: Include all names (currently - Command Line may override)

::
:: Exclude These Directories :
::
    /XD     :: eXclude Directories matching these names
::          :: eXclude no names (currently - Command Line may override)

::
:: Exclude These Files :
::
    /XF     :: eXclude Files matching these names
::          :: eXclude no names (currently - Command Line may override)
::
:: Copy options :
::
    /DCOPY:D    :: what to COPY for directories (default is /DCOPY:DA).
    /COPY:DT    :: what to COPY for files (default is /COPY:DAT).
::
:: Retry Options :
::
    /R:10   :: number of Retries on failed copies: default 1 million.
    /W:5        :: Wait time between retries: default is 30 seconds.
::
:: Logging Options :
::

代码…服务添加得很好,但当我尝试启动它时,出现了一个错误1053?

你迷路了,你知道你尝试了什么,想象一下我们的困境吧!哇,它没有发布我的代码!这种情况下出现错误1053的常见原因是用户使用了
sc create
或某种等效方法来创建直接指向普通可执行文件(如
robocy.exe
)的服务。由于
robocopy.exe
未实现强制服务接口,因此将其配置为服务将不起作用。你需要使用srvany或nssm(或其他任何第三方工具)。你迷路了,你知道你尝试了什么,想象一下我们的困境吧!哇,它没有发布我的代码!这种情况下出现错误1053的常见原因是用户使用了
sc create
或某种等效方法来创建直接指向普通可执行文件(如
robocy.exe
)的服务。由于
robocopy.exe
未实现强制服务接口,因此将其配置为服务将不起作用。您需要使用srvany或nssm(或任何其他第三方工具)。