Kaseya Community

Script to copy files runs successful but does not copy

  • Howdy,

    I have a script that works except for this one part where I tell it to goto a server share, copy a file, and then paste to a location on the client. This exact command works correctly if entered on the client at the command prompt.

    copy \\server\VPHOME\pki\roots\*.* "c:\program files\symantec antivirus\pki\roots\*.*"

    It is ran as the system, executed from a command shell, and Kaseya reports it as ran correctly.

    Any ideas why it wouldnt be working correctly?

    Thanks,
    Alan


    Legacy Forum Name: Script to copy files runs successful but does not copy,
    Legacy Posted By Username: Coldfirex
  • I believe you have to provide a complete path for the source even if

    \server... is a subfolder of your Kaseya agent temp folder.

    -Ed


    Legacy Forum Name: Script Discussion,
    Legacy Posted By Username: bellcpa
  • That was a type sorry. It should be a unc path \\server


    Legacy Forum Name: Script Discussion,
    Legacy Posted By Username: Coldfirex
  • Ah, in that case is your script executing the copy stepas system or as a user who has rights to access the share?

    If running as system the process will fail because the System account under which the Kaseya agent runs does not have access to network resources.

    Enter credentials of an account that has access to the"server" share under Agent tab,"Set Credential" option. and then add an extra "Use Credentials" step to your script before the copy step and set the step to execute as user.

    -Ed


    Legacy Forum Name: Script Discussion,
    Legacy Posted By Username: bellcpa