I opened a case with the support team but they asked me to ask the forum. Why isn’t there a BigFix forum? Is AppScan the correct one to use?
In BigFix, I am building an analysis to find out installed versions of applications on the computers I manage.
I manage to get some applications like Notepad++ using this relevance:
if (exists regapp “notepad++.exe” ) then (version of regapp “notepad++.exe” as string ) else ("—")
But that doesn’t work for Microsoft Teams. I have this analysis:
(values “DisplayName” of it, values “DisplayVersion” of it) of keys “SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Teams” of (keys of keys “HKEY_USERS” of it) of Registry
It is working on some but not all the computers. It just returns “” for some. But when I when I look at the registry key on these computers, I clearly find it exactly where it should be.
that is the problem. Teams stuffs its information into the current user hive - and that gets loaded and unloaded as users log on and off, so the information will appear/disappear/change.
You can inspect the HKEY_USERS (HKU) branches of the registry with BigFix.
The challenge is that Windows only loads HKU branches while the user is logged in. Once the user logs out of Windows, Windows unloads the hive. An unloaded hive cannot be queried. Likewise, if you were to inspect a terminal server, with many people logged in at the same time, you would see many HKU hives loaded.
Here is my result from a Win10 laptop with my account logged in
Add in It clause and grab the folder name, like this:
q: (name of it, versions of files "teams.exe" of folders "AppData\Local\Microsoft\Teams\current" of it) of folders of folders "C:\Users"
A: brolly33, 1.3.0.4411
q: concatenation "|" of (it as string) of (name of it, versions of files "teams.exe" of folders "AppData\Local\Microsoft\Teams\current" of it) of folders of folders "C:\Users"
A: brolly33, 1.3.0.4411
i need to read all versions smaller than. I tried in different ways and it doesn’t work
ex:
(versions of files “teams.exe” of folders “AppData\Local\Microsoft\Teams\current” of folders of folders “C:\Users”) whose version < “1.3.0.4411”
You are applying your ‘whose’ clause to the set of versions returned, not to the files.
This will report all the versions, together with the ‘below spec’ files.
(pathname of it, version of it) of files "teams.exe" whose (version of it < "1.3.0.4411") of folders "AppData\Local\Microsoft\Teams\current" of folders of folder "c:\users"
If you just want to know whether such files exist on a client:
exists files "teams.exe" whose (version of it < "1.3.0.4411") of folders "AppData\Local\Microsoft\Teams\current" of folders of folder "c:\users"
Just as an alternative approach of @trn in case others seeing this may have environments that may not use C:, or use C: drive and other drive letters for the OS
(pathname of it, version of it) of files "teams.exe" whose (version of it < "1.3.0.4411") of folders "AppData\Local\Microsoft\Teams\current" of folders of parent folders of folders (value of variable "USERPROFILE" of environment)