I’ll give a breakdown of the relevance and what it is doing.
This should give all of the folders of all of the chrome extensions of all users for all OSes: ( This relevance could be simplified, which I haven’t done yet )
Q: ( ( folders of folders of folders "AppData\Local\Google\Chrome\User Data\Default\Extensions" of folders of folders ("C:\Users"; "C:\Documents and Settings") ); (folders of folders of folders "Library/Application Support/Google/Chrome/Default/Extensions" of folders of folders "/Users") ; ( folders of folders of folders "google-chrome/Default/Extensions" of folders of folders "/home" ) )
A: C:\Users\James\AppData\Local\Google\Chrome\User Data\Default\Extensions\aapocclcgogkmnckokdopfmhonfmgoek\0.9_0
A: ...redacted...
This returns all of the manifest.json
files that contain the string “cwcsf-nativemsg-iframe-43c85c0d-d633-af5e-c056-32dc7efc570b.html” which should correlate to WebEx.
files "manifest.json" whose(exists lines containing "cwcsf-nativemsg-iframe-43c85c0d-d633-af5e-c056-32dc7efc570b.html" of it) of ( ( folders of folders of folders "AppData\Local\Google\Chrome\User Data\Default\Extensions" of folders of folders ("C:\Users"; "C:\Documents and Settings") ); (folders of folders of folders "Library/Application Support/Google/Chrome/Default/Extensions" of folders of folders "/Users") ; ( folders of folders of folders "google-chrome/Default/Extensions" of folders of folders "/home" ) )
This relevance returns all lines of manifest.json
that contain the string "version"
, but %22
is used because double quotes have to be escaped within relevance:
lines containing "%22version%22" of files "manifest.json" whose(exists lines containing "cwcsf-nativemsg-iframe-43c85c0d-d633-af5e-c056-32dc7efc570b.html" of it) of ( ( folders of folders of folders "AppData\Local\Google\Chrome\User Data\Default\Extensions" of folders of folders ("C:\Users"; "C:\Documents and Settings") ); (folders of folders of folders "Library/Application Support/Google/Chrome/Default/Extensions" of folders of folders "/Users") ; ( folders of folders of folders "google-chrome/Default/Extensions" of folders of folders "/home" ) )
The full relevance parses out the version info from that file line for all of the files that exist, then collapses any duplicate versions found:
unique values of (substrings between "%22" of following texts of firsts ":" of it) of lines containing "%22version%22" of files "manifest.json" whose(exists lines containing "cwcsf-nativemsg-iframe-43c85c0d-d633-af5e-c056-32dc7efc570b.html" of it) of ( ( folders of folders of folders "AppData\Local\Google\Chrome\User Data\Default\Extensions" of folders of folders ("C:\Users"; "C:\Documents and Settings") ); (folders of folders of folders "Library/Application Support/Google/Chrome/Default/Extensions" of folders of folders "/Users") ; ( folders of folders of folders "google-chrome/Default/Extensions" of folders of folders "/home" ) )
This is the part that does the parsing: (substrings between "%22" of following texts of firsts ":" of it) of ...
while unique values
collapses any duplication.
JSON inspectors could be used instead, but I didn’t use them in this case, partly because I didn’t take the time to do so, and partly because I need to check which platforms support the JSON inspectors at which version of the BigFix client. The direct string parsing should work everywhere.