Officially support what?
There is a minimal doc here: http://support.bigfix.com/labs/customright.html
I have some examples here: bigfix-content/ConsoleContextMenus at main · jgstew/bigfix-content · GitHub
You can debug these by running the session relevance through the BigFix Console Presentation Debugger or outputting the result to a file and then make sure what comes out works on the command line, then get that same thing in the right format in the registry, but I would get it working with regular session relevance first.
I don’t have this property in my vanilla root server. Ideally there would be an easy way to tell if a computer is 64bit or not just using the mandatory built in properties, but otherwise you’d have to create one.
If you had an analysis that returned the info for Trend Micro
in general, then those properties could be used to determine the correct path for this EXE.
Example:
preceding texts of firsts "\" of following texts of firsts "\" of values of client settings whose(name of it = "_BESClient_UploadManager_BufferDirectory") of bes computers
This should return Program Files (x86)
or Program Files
on all Windows systems in BigFix in almost all cases. You can check by looking at the following:
(multiplicity of it, it) of unique values of preceding texts of firsts "\" of following texts of firsts "\" of values of client settings whose(name of it = "_BESClient_UploadManager_BufferDirectory") of bes computers
Next:
Once you have the above session relevance returning valid results for ALL windows systems, then you can move forward and generate the command you need for ALL computers:
("%22C:\" & it & "\Trend Micro\OfficeScan Client\pccntmon.exe%22 -us") of preceding texts of firsts "\" of following texts of firsts "\" of values of client settings whose(name of it = "_BESClient_UploadManager_BufferDirectory") of bes computers
Next:
Put it all together with hostname: (again… for ALL computers)
("\\" & item 0 of it & " %22C:\" & item 1 of it & "\Trend Micro\OfficeScan Client\pccntmon.exe%22 -us") of (hostname of it, preceding texts of firsts "\" of following texts of firsts "\" of values of client settings whose(name of it = "_BESClient_UploadManager_BufferDirectory") of it) of bes computers
Sanity check that the results look right.
Next:
Adapt it into the format required for Console Context Menu:
("\\" & item 0 of it & " %22C:\" & item 1 of it & "\Trend Micro\OfficeScan Client\pccntmon.exe%22 -us") of (hostname of it, preceding texts of firsts "\" of following texts of firsts "\" of values of client settings whose(name of it = "_BESClient_UploadManager_BufferDirectory") of it) of current computer
which should become:
"ShellCommandRelevance"="\"cmd.exe /k C:\PSTools\psexec.exe -s " & ( ("\\" & item 0 of it & " %22C:\" & item 1 of it & "\Trend Micro\OfficeScan Client\pccntmon.exe%22 -us") of (hostname of it, preceding texts of firsts "\" of following texts of firsts "\" of values of client settings whose(name of it = "_BESClient_UploadManager_BufferDirectory") of it) of current computer )"
I haven’t actually tested any of this in production since I don’t have Trend Micro, but hopefully this works.
I worked with ShellCommandRelevance
for the first time last month, so I’m much better at the session relevance part than the ShellCommandRelevance
part.