Link to home
Create AccountLog in
Installation

Installation

--

Questions

--

Followers

Top Experts

Avatar of Pkafkas
Pkafkas

I am trying to deploy Microsoft Teams enterprise wide, for mass installation on different computers.
We use Zenworks and it works very well with .msi files and .exe files and I can add scripts and regitry hacks to an installation bundle.

If I try to install Teams, it installs to user accounts on a computer that have never had Teams installed before.  But for users that have installed teams it does not install.  How can I force teams to install anyway on a user account through an installation package on the computer?

I guess knowing what the problem sis key first.  Then finding the solution for the problem.

https://sysmansquad.com/2021/01/26/trigger-teams-installer-for-user-after-machine-wide-installer/

https://xenit.se/tech-blog/why-does-teams-not-install-for-my-users/

Zero AI Policy

We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.


Avatar of BembiBembi🇩🇪

My first question would be, why do you wan tto install it if it is already installed...
Maybe more a patching question?
Or you may have to create a removal package first. 

Avatar of PkafkasPkafkas

ASKER

Well, we want a standardized installation for all computers.  It will make things easier to trouble-shoot later.

Avatar of BembiBembi🇩🇪

Yea, I can imagine.
As I said, one option is to uninstall and to reinstall.
The other option is to use GPOs for the configuration.
The third option would be to splitt is up into a basic installation and a customizing installion.
For the clients, which already have Teams installed, you apply only the customization package.

Im not aware about the capability of Zenworks, but most of the installers and distribution tools are capable in that way. 


Reward 1Reward 2Reward 3Reward 4Reward 5Reward 6

EARN REWARDS FOR ASKING, ANSWERING, AND MORE.

Earn free swag for participating on the platform.


Avatar of PkafkasPkafkas

ASKER

What does this code do?  It is from: Trigger Teams Installer for User After Machine Wide Installer - Systems Management Squad (sysmansquad.com) 


<#
.SYNOPSIS
    Launch the Teams install as the logged in user via a scheduled task
.DESCRIPTION
    This script will create a scheduled task if one is not found which is used to
    install Microsoft Teams as the logged in user. This scheduled task executes
    the Teams.exe found in %ProgramFiles% so that a user can start using Teams
    shortly after the Machine Wide installer completes instead of having to 
    log off and back on.
.NOTES
    Generally used as a script that runs after a Teams Machine Wide Installer completes
#>
if (!(Get-ScheduledTask -TaskName 'Teams User Install - Post Machine Wide Install' -ErrorAction SilentlyContinue)) {
    switch ([System.Environment]::Is64BitOperatingSystem) {
        $true {
            [string]$TeamsMachineInstaller = Get-ItemPropertyValue -Path registry::HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Run\ -Name TeamsMachineInstaller -ErrorAction Stop
            [string]$Exe = $TeamsMachineInstaller.Substring(0, $TeamsMachineInstaller.IndexOf('.exe') + 4).Trim() -Replace "C:\\Program Files\\", "${env:ProgramFiles(x86)}\"
    
        }
        $false {
            [string]$TeamsMachineInstaller = Get-ItemPropertyValue -Path registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\ -Name TeamsMachineInstaller -ErrorAction Stop
            [string]$Exe = $TeamsMachineInstaller.Substring(0, $TeamsMachineInstaller.IndexOf('.exe') + 4).Trim()
        }
    }
    [string]$InstallerArgs = $TeamsMachineInstaller.Substring($Exe.Length, $TeamsMachineInstaller.Length - $exe.Length).Trim()
    $newScheduledTaskSplat = @{
        Action      = New-ScheduledTaskAction -Execute $Exe -Argument $InstallerArgs
        Description = 'Start the Teams installer for the currently logged on user after a Teams Machine Wide install'
        Settings    = New-ScheduledTaskSettingsSet -Compatibility Vista -AllowStartIfOnBatteries -MultipleInstances IgnoreNew -ExecutionTimeLimit (New-TimeSpan -Hours 1)
        Trigger     = New-ScheduledTaskTrigger -At ($Start = (Get-Date).AddSeconds(5)) -Once
        Principal   = New-ScheduledTaskPrincipal -GroupId 'S-1-5-32-545' -RunLevel Limited
    }
    
    $ScheduledTask = New-ScheduledTask @newScheduledTaskSplat
    $ScheduledTask.Settings.DeleteExpiredTaskAfter = "PT0S"
    $ScheduledTask.Triggers[0].StartBoundary = $Start.ToString("yyyy-MM-dd'T'HH:mm:ss")
    $ScheduledTask.Triggers[0].EndBoundary = $Start.AddMinutes(10).ToString('s')
    
    Register-ScheduledTask -InputObject $ScheduledTask -TaskName 'Teams User Install - Post Machine Wide Install'
}

Open in new window


Avatar of BembiBembi🇩🇪

Its written in the description.
    This script will create a scheduled task if one is not found which is used to
    install Microsoft Teams as the logged in user. This scheduled task executes
    the Teams.exe found in %ProgramFiles% so that a user can start using Teams
    shortly after the Machine Wide installer completes instead of having to
    log off and back on
.

At the end, it avoiding the need of logging of and login on again for the user. 

Avatar of PkafkasPkafkas

ASKER

This looks promising, But the below did not work for me, if Teams was already installed under my username.  How can I remove teams (execute a script) before the installation is applied?

Getting Started with Microsoft Teams Enterprise Deployment, Part 1 - Microsoft Tech Community (https://techcommunity.microsoft.com/t5/healthcare-and-life-sciences/getting-started-with-microsoft-teams-enterprise-deployment-part/ba-p/714584_

Install Teams using Microsoft Endpoint Configuration Manager - Microsoft Teams | Microsoft Docs (https://docs.microsoft.com/en-us/microsoftteams/msi-deployment)

Clean up and redeployment procedure

If a user uninstalls Teams from their user profile, the MSI installer will track that the user has uninstalled the Teams app and no longer install Teams for that user profile. To redeploy Teams for this user on a particular computer where it was uninstalled, do the following:

  1. Uninstall the Teams app installed for every user profile. For more information, see Uninstall Microsoft Teams.
  2. Delete the directory recursively under %localappdata%\Microsoft\Teams\.
  3. Delete the HKEY_CURRENT_USER\Software\Microsoft\Office\Teams\PreventInstallationFromMsi registry value.
  4. Redeploy the MSI package to that particular computer.

   

Free T-shirt

Get a FREE t-shirt when you ask your first question.

We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.


ASKER CERTIFIED SOLUTION
Avatar of BembiBembi🇩🇪

Link to home
membership
Log in or create a free account to see answer.
Signing up is free and takes 30 seconds. No credit card required.
Create Account
Installation

Installation

--

Questions

--

Followers

Top Experts

Installation is the act of making a computer program program ready for execution. Because the process varies programs often come with a specialized program responsible for doing whatever is needed for their installation. Installation may be part of a larger software deployment process. Cross platform installer builders that produce installers for Windows, Mac OS X and Linux include InstallAnywhere, InstallBuilder and Install4J. Installers for Microsoft Windows include Windows Installer, InstallShield, and Wise Installation Studio; free installer-authoring tools include NSIS, IzPack, Clickteam, InnoSetup, InstallSimple and WiX. Mac OS X includes Installer, and also includes a separate software updating application.