Trying to get Microsoft Teams version

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.

Any ideas?

1 Like

I suspect it’s the

keys of keys “HKEY_USERS” of it

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.

Thanks trn.

How can I fix? How can I inspect HKEY_USERS? Or is there another way of getting MS Teams version currently installed?

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

I wonder if it might be better to check the user’s filesystem for the teams executable?

q: versions of files "teams.exe" of folders "AppData\Local\Microsoft\Teams\current" of folders of folders "C:\Users"
A: 1.3.0.4411

or

q: versions of files "teams.exe" of folders "Microsoft\Teams\current" of CSIDL folders 28 
A: 1.3.0.4411

Interesting brolly33

I have tried your first syntax and get results where it was empty before.

But … there is always something! Some computers returns “”. How can I flatten the results (and maybe get the user name for each version)?

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
1 Like

Thanks again brolly33. How can I flatten the results showing “multiple results”? I would like to see the results without having to hover the mouse.

Concatenate into one mega-result?

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
2 Likes

Thanks brolly33.

Your solution is working. Can’t wait to learn more about this language. Do you have a recommendation to learn it?

@emoreau Welcome to the Next Level of BigFix! :fireworks:

https://developer.bigfix.com/ is your best friend for Relevance Language.
There are some tutorials as well as some in-depth learning and information.

1 Like

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"

3 Likes

Thanks !!! You solve the problem !!!

also, if using teams for enterprise, take a look at the teams machine wide installer. it does use the hklm hive for the install and is an MSI.

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)

1 Like