Microsoft has finally released Microsoft Teams installer that installs all files to Program Files. But still, it is not perfect, because it supposed to be only for Virtualized Desktop Infrastructure (VDI). The big question is if it is possible to install it on regular Windows 10? This is what the Master Packager team tried to figure out.
Following command line installs Microsoft Teams:
msiexec /i "path_to_msi" ALLUSER=1.
By setting ALLUSER=1 property MSI will install Teams to Program Files. Please note, that it is not ALLUSERS very well-known property, but Microsoft Teams custom created ALLUSER property without letter S. This choice of public MSI property name has confused many of us.
It's not possible to disable auto-launch of Teams with property OPTIONS="noAutoStart=true" when installing Teams on VDI using the ALLUSER property.
By installing on regular Windows 10 using ALLUSER=1 property MSI will return error:
Installation has failed. “Cannot install for all users when a VDI environment is not detected.”
This error is not configured through MSI tables but is returned by Teams.exe. At this point we launch Process Monitor to detect what is needed for Teams to successfully be installed.
Teams.exe needs ”HKEY_LOCAL_MACHINE\SOFTWARE\VMware, Inc.\VMware VDM\Agent” registry key to be created on a target machine in order to install Teams using property ALLUSER=1.
Auto updates will not work when using property ALLUSER=1 meaning each version needs to be deployed by IT administrator manually.
What’s inside the MSI:
Without setting ALLUSER=1 property Teams MSI behaves as we previously described in one of our blog posts: https://www.masterpackager.com/blog/how-microsoft-teams-installer-should-have-looked-like-from-the-beginning. In short Teams MSI installs Teams.exe to Program Files that is the actual installer triggered by each user on windows login by the run registry.
By setting ALLUSER=1 property Teams MSI still is not using Windows Installer tables for installing all the files, instead, additional Custom Actions were created by Microsoft that will unpack all the files from Teams.exe to Program files as well uninstall them.
CA “RunInstalledExecutable" will install files to Program Files using Teams.exe with switch –allUsers.
CA “UninstallAllUser" will uninstall all files using in Binary table saved script.
We created MST file that will enable Teams MSI to be installed on regular Windows 10. Here are the changes we made in the MST file:
Created [HKEY_LOCAL_MACHINE\SOFTWARE\VMware, Inc.\VMware VDM\Agent] registry key
Set ALLUSER property to 1
Created ALLUSERS property and set to 1 to make Microsoft Teams entry visible in Add/Remove Programs
Created ARPNOMODIFY property and set to 1 to not show modify button in Add/Remove Programs
Changed ProductName property from “Teams Machine-Wide Installer” to “Microsoft Teams”
Added Microsoft Teams Icon to be displayed in Add/Remove Programs
Created Custom Action “CA_DeleteDesktopShortuct" that will delete the desktop shortcut.
Created NODESKTOPSHORTCUT=1 property to delete the desktop shortcut. To leave the desktop shortcut just change NODESKTOPSHORTCUT property to 0. Default value set to 1.
Create Custom Action “CA_DisableMSTeamsAutoRun" that will delete Teams run registry to stop auto launching for every user.
Created DISABLEMSTEAMSAUTORUN=1 property to delete Teams run registry. To leave run registry unattached just change DISABLEMSTEAMSAUTORUN property to 0. Default value set to 0.
As just described, with little modification via MST file it is possible to install Microsoft Teams MSI to all Windows 10 machines, not just on VDI. It would be nice to see a proper MSI for Teams that use MSI tables instead of being bundled in a binary file inside the MSI.
Read our blog post about "How Microsoft Teams installer should have looked like from the beginning".
If you want to look into MSI/MST files, create MSI/MST from the scratch and do all possible modifications to them in the intuitive user interface, you are welcome to download Master Packager Standard edition for free. It is all you need when working with MSI/MST files.