I’m attempting to compare properties of a filename and having trouble figuring out how to accomplish it. i would appreciate some help.
I am trying to compare write an analysis property that will compare the file name to the originalfilename of version block 1. I’m not exactly the most proficient in relevance language so this is seeming to not make sense to me, but here is what I was trying, it obviously doesn’t work and my non programming based mind isn’t able to figure out why:
(if (exists descendants whose (name of it does not = value “OriginalFilename” of version block 1 of it) of folder “c:”) then (((value “OriginalFilename” of version block 1 of it) of descendants of folder “c:”) else “Filename never changed”))
q:(name of it, value “OriginalFilename” of version block 1 of it) of descendants whose (name of it != value “OriginalFilename” of version block 1 of it) of folder “c:”
But… I don’t recommend doing this in a BigFix property… It will cause the agent to iterate through all the files on the computer every time the property is evaluated… this can take a very long time and cause performance issues…
Is there a way to avoid checking every single file and still get what you are looking for?
We’re actually just looking for all .exe files. I work for an organization that has very strict security controls and we find that some people like to do any and everything they can to cricumvent said controls, like changing the names of an exe for firefox so they can continue to use it, though they’ve been told not to and the like.
I edited your post to limit to .exe, now it only takes 45 seconds to run vs the 10 minutes it took prior:
q: (name of it, value “OriginalFilename” of version block 1 of it) of descendants whose (name of it ends with “.exe” and name of it != value “OriginalFilename” of version block 1 of it) of folder “c:”
If there is anything else you can think of to speed it up, I’d appreciate it.