(imported topic written by SystemAdmin)
I’ve been trying to get something to work in action script and I just can’t get there. I am trying to set a parameter in the action script using relevance. I have tried puting curly braces, parentheses, and quotes in all sorts of different places and I’m not getting it. I have also done some searching here and still haven’t figured out where I’m getting it wrong.
So, what I am trying to do is set a parameter based on a key in a text file.
I am trying to have the action script download the text file. For this explanation we’ll call it “test-file.txt”. This file looks like this:
COMPUTER NAME=parameter
COMPUTER NAME2=parameter2
And then I have tried several variations of a parameter line, like so:
parameter “P1” = {key (computer name) of file ((pathname of client folder of current site) & “__Download\test-file.txt”)}
As you can see, what I am trying to do is use the clients computer name to pick which line of the file to use for the parameter.
As I said, I have tried different placement of {}, (), “”, etc… I have even shrunk down the line to:
parameter “P1” = “{key “{computer name}” of file “c:\test-file.txt”}”
Just using a direct pointer to a file for testing purposes. Again, changing around {}, (), “”, etc… It seems that the computer name part is where things are failing. BUT, it seems that I can set a parameter to {computer name} just fine:
parameter “comp” = “{computer name}”
So, I just don’t get what I am missing. If I do “key (computer name) of file “c:\test-file.txt”” in relevance it returns what I am expecting.
The last bit of info I can think of is, when I run the fixlet the result is “”. When I look at the details to see what happened, my parameter line has “Failed” next to it, but no other lines have any status, including the lines above the parameter line. So, to me it looks like BigFix doesn’t like something about the line even before the action script really tries to run.
Hope that all made sense. Thanks for any assistance!