Fixlet and Action Script Question

(imported topic written by SystemAdmin)

I have three questions on relevance and action script as the following,

  1. Is there any relevance that can get the name of current fixlet? (agent sides)

  2. In action script, how can I download the file dynamically on the corresponding computer base on the computer name?

For example: There are two csv files ,which are named as the computer name, (Files name: “WIN2K8R2.csv” & “CENTOS6.csv”) on the server (Path: C:\Program FileBigFix EnterprisBES Server\wwwrootbes\Uploads\CSV).

For the computer “WIN2K8R2”, it will download “WIN2K8R2.csv”.

For the computer "CENTOS6, it will download “CENTOS6.csv”

(This questions is in action script, command “download” can’t be able to put {} relevant on it.)

  1. In action script, is there any method to keep check the file status? For example, the computer “WIN2K8R2”(Agent side) download the file “WIN2K8R2.csv”(Server side) once. Afterward, if the file “WIN2K8R2.csv”(Server side) is updated , the computer “WIN2K8R2”(Agent side) will download it. Otherwise, the computer “WIN2K8R2”(Agent side) will not download it.

Thank you.

(imported comment written by SystemAdmin)

In answer to your questions:

  1. Not sure what you are asking here. Are you asking can an action can find out its own name or the name of its source fixlet? I believe the answer to this is yes:

    origin fixlet id of Q: values of headers
    "Subject" of fixlets of site whose (name of it =
    “BigFix Labs”) A: Uninstall BES Audit Trail Cleaner Tool A: Install BES Audit Trail Cleaner Tool A: Install BES Computer Remover Tool . . .

So maybe something like:

value of header 
"Subject" of active action -or- value of header 
"Subject" of fixlet whose (id of it = (origin fixlet id of active action)) of current site
  1. You can use the ‘begin prefetch block’ . . . ‘end prefetch block’ structure. The ‘add prefetch item’ command allows relevance substitution. There are some restrictions, so you should look in the Action Guide ( documentation for guidance. Here is an example from the guide:

    begin prefetch block

    {name of operating system =
    “Windows 2000”
    } add prefetch item
    “name=up.exe sha1=12 size=45 url=”

    else add prefetch item
    “name=up.exe sha1=12 size=45 url=”
    } endif end prefetch block

  2. There is not really a method for a client to check the “status” of a file hosted on another computer. The best you could do is download the file and compare the download’s SHA1 and/or size to known values (e.g., sha1 of “c:\foo.txt” = sha1 of __Download\foo.txt).

(imported comment written by SystemAdmin)

It was really helpful to me, thanks Chris.Luther.