Next Topic

Previous Topic

Book Contents

writeFile()

Writes a file selected from Manage Files Stored on Server to the full path filename specified on the managed machine. Enter a new filename if you want the file to be renamed.

Each time a procedure executes the writeFile() command, the agent checks to see if the file is already there or not by hashing the file to verify integrity. If not, the file is written. If the file is already there, the procedure moves to the next step. You can repeatedly run a procedure with writeFile() that sends a large file to a managed machine and know that the VSA only downloads that file once.

Note: Environment variables are acceptable if they are set on a user's machine. For example, using the path %windir%\notepad.exe would be equivalent to C:\windows\notepad.exe.

Note: This command can download files from a LAN file source instead of the VSA using Agent > Configure Agents > LAN Cache. Files have to be larger than 4k bytes.

Example - Core.1 Windows Procedures.Desktops.Auditing.Share and NTFS.Audit Non-Admin Shares (SRVCHECK)

writeDirectory("VSASharedFiles\3rd Party Utils\DevCon\ResKit\srvcheck.exe", "#agenttemp#\srvcheck.exe", "Windows 8.1", "Halt on Fail")