I have been digging and cant find this in the forum or help. I need to be able to use the File Source Path (from Patching) in an Agent Procedure. Basically I want a universal install script for a file that I will push out to all client servers in our patching directory. Since each agent is already mapped to their repsective Patching File Source it seems logical to leverage that path to download the file the the client.
How do I call that path in an Agent Procedure?
many thanks in advance for your replies
Not sure if I have missed the explanation of the question correctly, but accessing the File Source Path is simplest done by using a database view. There is a view provided vPatchConfiguration that contains the path (local and UNC) to the configured file source.
The two variables are
Using these variables in your agent procedure will allow acess to the File Source Path.
Well - there is the "Get URL (Use Patch File Source setting)" step... It allows you to get a file to the file source, then put that file in a local directory on an agent... then, when the procedure next runs, it'll see the file's already been gotten and not re-get it, I believe.
So basically, you might be able to get this to do what you want. There are two scenarios for this command, "intended" and "might work"
1. Intended: you use the step to get, say, www.cpuid.com/.../1.57.1-setup-en.exe and put it in c:\temp\1.57.1-setup-en.exe
The first time the script runs it will "populate" the file source with this file, and on subsequent runs it'll see it's already there and not redownload it.
2. Might Work: so let's say you already have a file, we'll call it "myapp.exe" and it is already located in the file source... so provide a "dummy" URL like http://localhost/myapp.exe and write it to c:\temp\myapp.exe
This might fail since http://localhost/myapp.exe doesn't exist - but if the Get URL (Use Patch File Source Setting) step just checks to see if the file exists, and doesn't check the URL if it finds the file already downloaded, then it'll work... big if, worth a try, let us know if it works :)
Thanks I am trying that now. the Get URL sounds like the perfect way as this will avoid the need to prepopulate the server with the file.
Thanks for all of the feedback. That last one did it for me! We are using the distribute file to get the file to all of our client servers.