1 minute reading time (232 words)

SOLVED: Microsoft Teams "Cannot install for all users when a VDI environment is not detected"

How to fix error when installing Microsoft Teams "Cannot install for all users when a VDI environment is not detected"  

Teams.exe Installation has failed
Cannot install for all users when a VDI environment is not detected

Installing Teams per-machine

In Virtual Desktop environments, Teams should be installed per-machine rather than per user. The per-machine installation puts the Teams executable into "C:\Program Files (x86)\Microsoft\Teams" instead of the user's AppData profile folder "C:\Users\UserName\AppData\Local\Microsoft\Teams"

Use the ALLUSER=1 option to install Teams per-machine

msiexec /i Teams_windows_x64.msi ALLUSER=1 ALLUSERS=1 /qn

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

If you get the error "Cannot install for all users when a VDI environment is not detected" when installing Teams using the ALLUSER=1 option for per-machine installation, it's because Teams checks for VDI environment by looking for one of these registry keys.

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

Create WVDEnvironment registry key using PowerShell

The solution is to create one of the VDI registry keys using PowerShell.

# create registry key and value for WVDEnvironment
New-Item -Path "HKLM:\SOFTWARE\Microsoft" -Name "Teams" -Force
New-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Teams" -Name "IsWVDEnvironment" -Value 1 -Force
 

Related Posts

 

Comments

No comments made yet. Be the first to submit a comment
Already Registered? Login Here
Thursday, 01 June 2023
You can help support this website by buying me a coffee!
Buy Me A Coffee