How do you know when the software is installed? The presence of an Application in /Applications? Something in Library somewhere? You can probably repurpose relevance from another Mac software installation fixlet, but if you post more details, I’d be happy to help you build it.
Ok perhaps I should explain more. I used this Actionscript to uninstall Mcafee and all reference to it. I now want to know which machines, if any, it is still installed on or indeed if there’s any reference to it still on the OS and how one would go about ascertaining that?
thanks
Delete __createfile
Delete runme.sh
createfile until myend
Great. What you’re looking for is called relevance. Ideally you would have your uninstall task applicable only to computers with McAfee actually installed. To do that, we can use any of the files you’re deleting. Probably safe to assume that if /Library/LaunchDaemons/com.mcafee.agent.ma.plist is on a computer, McAfee is installed.
You can use very simple relevance to check if the file exists:
If you make that one of the relevance statements on your uninstall task, now only computers with that file (and thus, we think, McAfee installed) will show as relevant for the task. You could also make that relevance an analysis property that will report True or False.
So I set the relevance as below. So it is safe to assume that the software is NOT installed on the difference between the number of Applicable computers based on the below relevance and the overall number of Macs checking into BF?
Could you also elaborate on where you say “You could also make that relevance an analysis property that will report True or False.” ?
Relevance 1
mac of operating system
Relevance 2
exists file “/Library/LaunchDaemons/com.mcafee.agent.ma.plist”
you need to create an analysis with relevance as “mac of operating system”.
Then create a property within the analysis. You can use the second relevance for the property.
In the Analyses section of your console, you should see several analyses, which are comprised of persistent “properties,” which gather information about a computer. Operating System, logged in user, versions of installed software, etc. You can create your own analysis or property of an existing analysis to which you have permission, then put any relevance (such as whether McAfee exists) there to be evaluated. Then you’ll be able to see at a glance if a computer reports True or False for your analysis property.
Well, either the file I picked at semi-random from the list of files your script deletes wasn’t wasn’t a good indicator that McAfee is installed, or McAfee isn’t on as many computers as you thought. Is there an Application in /Applications? That might be a more surefire file to look for.
You definitely do not want to send your script without relevance. Doing so would make it try to run on all computers, whether or not they have McAfee, and you’d have no way of knowing after it ran if it did anything. It would also always show as relevant in the future.
BigFix gets a lot less useful if you’re not using relevance to target specific scenarios, since that’s the way you know you’ve actually fixed something. It can be frustrating, especially at first, to get relevance right, but it is always worth putting in the time.
Close – on Macs, Applications are really more like special folders than standalone files. As such, you’ll need to use the application or folder inspector. You’ll also need to give it the full path of the application.
If you haven’t already, you should play around with the built-in QnA tool, which is a relevance tester installed on any computer with BigFix. On Mac you can access it by typing sudo /Library/BESAgent/BESAgent.app/Contents/MacOS/QnA
If you try the below in QnA on a computer with McAfee installed, what does it report?
exists application "/Applications/Mcafee Endpoint Security for Mac.app"
If true, great – go ahead and use that. If false, I’d wonder if maybe there are capitalization issues. You may have seen the phrase as lowercase in relevance. That will be useful in this case. If you tell BigFix the name of the application you want in all lowercase and also tell it to convert the name of the existing application to lowercase, you don’t have to worry about case sensitivity. Here’s an example of that:
exists application whose (name of it as lowercase = ("/Applications/McAfee Endpoint Security for Mac.app" as lowercase))
If you run the below in QnA, you should be able to see the effects of using as lowercase (in relevance, it’s called “casting”)
("/Applications/McAfee Endpoint Security for Mac.app" as lowercase)
I tried QnA and got back “True” so have now used that and its highlighting even more machines with no product installed!
That’s extremely helpful thank you.
Can I ask then if the iteration of OS is older e.g. MacOS 10.10 then presumably I would have to verify that the “Mcafee Endpoint Security for Mac.app” was indeed called that when it was installed at that time which could have been years ago or do I just add more relevance to include say a keyword that references Mcafee?
Here’s a generalized statement that will just look for anything with the name “Mcafee” in /Applications
exists applications whose (name of it as lowercase contains "mcafee") of folder "/Applications"
If you wanted to make an analysis property that reported the names of applications with “McAfee” in the name on a given computer, you could do this:
names of applications whose (name of it as lowercase contains "mcafee") of folder "/Applications"
I like the suggestion from @alinder to create an Analysis Property. Before writing the Fixlet relevance, it’s often useful to identify all of the cases so you can be sure what you are looking for. We usually either use an Analysis property for this, or else use Bigfix Query to find related / edge cases.
names of applications whose (name of it as lowercase contains “mcafee”) of folder “/Applications” which is working as you describe (and giving me different names of the app) but there is a large group of machines under True? I assume that’s just a timing issue?`
It sounds like maybe you replaced the relevance for the same analysis property, so it used to report true/false, but now you have it giving the name. Computers will only re-evaluate the answer to that property when they report in again, so you should see the True/Falses start going away and being replaced with the new info you’re looking for shortly.