Kaseya Community

Accessing ..\Docs\ folder

  • Hi All,

    is it possible to READ a Agent document from a script ?  I need to copy a agent document from the kaseya server to the agent machine.

    I'm trying with a "Write File" command but if I enter " ..\Docs\myfile.txt " (previously uploaded) in the field " Select the source file stored on the server: " the system can't find the file :(

    Thank you very much !


  • The problem is that step starts in the "ManagedFiles" directory on the KServer, but UserProfiles (where documents live) is two levels up.


  • That was fun to figure out, by the way. So thanks for that. :P

  • Thank you very much.

    Before to copy this file I check if it exists.  If I use the following path in the "Test File" command the check fails :


    Should I use a different system to check for it?

    Thank you again !

  • I just tried with  :


    But with no luck. Where can I find documentation about this ?

    Another big thank you !

  • You can't do a "test file" check on file on the kserver (..\..\UserProfiles\#vMachine.agentGuid#\Docs\myfile.txt) via another machine, if you do that it will try and locate the file on the machine that you running the check from.

    You can however do a check after you have written the file to the machine.

  • So,

    to copy a file from the Agent documents (previously uploaded to the kaseya server) to the kaseya agent working directory of a target machine it's possible to do a "Write file"

    from  ..\..\UserProfiles\#vMachine.agentGuid#\Docs\myfile.txt  

    to  #vAgentConfiguration.agentTempDir#\myfile.txt 

    Is it correct ?

    Thank you very much again !   I tried to find documentation about this kind of operations but with no luck Sad

  • Hi,

    the command you suggested works like a charm but... where can I find more detailed documentation ?  Does it exist ?

    Thank you !

  • Negative. You won't find documentation for stuff like this. These techniques are pretty much hacks. This won't be the last time you will have to innovate something on your own either.