Ok so we have an analysis for a product called Fireeye and we would like to use one analysis to query Windows and OSX devices for “version” and “state” information.
The following works for Windows
All the things
if exists service “xagt” then (version of it, state of it) of service “xagt” as string else “Not installed”
The following works for Mac
Fireeye Version
if (exists file “/Library/FireEye/xagt/xagt.app/Contents/Info.plist”) then (string “CFBundleShortVersionString” of dictionary of file ("/Library/FireEye/xagt/xagt.app/Contents/Info.plist" as string)) else “Not installed”
Fireeye Running
exists names whose(it starts with “xagt”) of processes as string
What we would like is to combine all of these questions into one tidy property in an analysis like the following
if (windows of operating system and exists service “xagt”) then (version of it, state of it) of service “xagt” as string else “Not installed” if (mac of operating system and exists file “/Library/FireEye/xagt/xagt.app/Contents/Info.plist”) then ((string “CFBundleShortVersionString” of dictionary of file ("/Library/FireEye/xagt/xagt.app/Contents/Info.plist")), (exists names whose(it starts with “xagt” OR it starts with “FireEye”) of processes as string)) else “Not Installed”
The first portion for Windows of course works beautifully, the next sections for OSX however fail miserably because, I assume, it’s not a real computer and deserves to be shamed into a non-functioning state for its pretension!
That or it’s because the If Then Else query perhaps does not like trying to be combined with data queries against two different sources?
Or if anyone has an idea of how we could make this work I’d be most grateful!
Kind regards,
Shannon