I tested with the HTTP option in Software Deployment and it still failed. This is the script:
Here is the error from Desktop Central:
Finally, here is the logs from robocopy, itself:
Again, if I copy the batch file locally on the machine and run the script as administrator, it works no problem.
- :: This script adds the indicated directories and
:: copies files from the network share into those
:: directories.
:: Add ejgmgmt working and log directories.
::New-Item -ItemType Directory -Path c:\ejgmgmt
:: Use robocopy to copy over the working directory
:: and associated contents locally and log the
:: results.
robocopy \\file1\ejgmgmt\ejgmgmt_working c:\ejgmgmt /B /E /V /NP /R:4 /W:15 /LOG+:c:\ejgmgmt\logs\robocopy.log
Here is the error from Desktop Central:
- The directory cannot be removed
Finally, here is the logs from robocopy, itself:
- -------------------------------------------------------------------------------
ROBOCOPY :: Robust File Copy for Windows
-------------------------------------------------------------------------------
Started : Monday, December 26, 2016 10:17:19 AM
2016/12/26 10:17:19 ERROR 5 (0x00000005) Getting File System Type of Source \\file1\ejgmgmt\ejgmgmt_working\
Access is denied.
Source - \\file1\ejgmgmt\ejgmgmt_working\
Dest : c:\ejgmgmt\
Files : *.*
Options : *.* /V /S /E /DCOPY:DA /COPY:DAT /B /NP /R:4 /W:15
------------------------------------------------------------------------------
2016/12/26 10:17:19 ERROR 5 (0x00000005) Accessing Source Directory \\file1\ejgmgmt\ejgmgmt_working\
Access is denied.
Again, if I copy the batch file locally on the machine and run the script as administrator, it works no problem.