How to resolve Microsoft Teams error cannot install for all users when a VDI environment is not detected

Case

You try to install Microsoft Teams in per-machine mode on a Microsoft RDS session host machine. During the installation you come across the following error:

Cannot install for all users when a VDI environment is not detected.

Solution

Microsoft Teams machine-wide installer checks for the presence of any of the following registry keys during installation:

  • HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Teams\IsWVDEnvironment
  • HKLM\Software\Citrix\PortICA
  • HKLM\Software\VMware,Inc.\VMware VDM\Agent

If you are installing on a Microsoft RDS session host machine, you should create any of the above registry keys to spoof the VDI requirement of the ALLUSERS and ALLUSER flags.

Therefore you first need to create any of the above registry keys on your machine. The registry key should have following values:

Type: REG_DWORD
Value: 1

After the registry key is created then you can run the Microsoft Teams installation command in machine-wide mode, as shown below:

msiexec /i <path_to_msi> /l*v <path_to_logfile_name> ALLUSER=1 ALLUSERS=1

Was this article helpful?

Related Articles