December 10, 2020

Open multiple Microsoft Teams instances

I share here a trick how to open a second instance of the Microsoft Teams client.
I personally prefer to open Teams in the browser for this but one of you might be interested in it.

Original Solution/ Reference

(If you don't want to do this yourself manually, use the feature in Teams Shortcuts explained in next section.)

The trick is explained in this post: https://danielsmon.com/2020/04/02/multiple-ms-teams-accounts-on-the-desktop/ (it dates back to 2020-04-02, so it is pretty new)
Here is the link to the gist bat/cmd file file: https://gist.github.com/DanielSmon/cc3fa072857f0272257a5fd451768c3a 

Save this file on your PC and run it. You might want to change its name since it will be the name used for the custom profile folder.

You might want to copy your custom backgrounds to these other profiles as well.

I have noticed some troubles if you are in a meeting and launch a second instance the meeting will be interrupted. So rather start this at the beginning.

Teams Shortcuts implementation

You can run a Teams second instance comfortably from the Teams Shortcuts System icon tray context menu:

This will avoid you all the step described in the original solution.

Code

Implemented in ahk/Lib/Teams.ahk -> Teams_OpenSecondInstance (function)

Teams_OpenSecondInstance(){
If GetKeyState("Ctrl") {
    Run, "https://connext.conti.de/blogs/tdalon/entry/teams_multiple_instances"
    return
}
EnvGet, A_UserProfile, userprofile
wd = %A_UserProfile%\AppData\Local\Microsoft\Teams
sCmd = Update.exe --processStart "Teams.exe"

EnvGet, A_LocAppData, localappdata
up = %A_LocAppData%\Microsoft\Teams\CustomProfiles\Second
EnvSet, userprofile,  %up%
; Run it
TrayTipAutoHide("Teams Shortcuts", "Teams Second Instance is started...")
Run, %sCmd%,%wd%
EnvSet, userprofile,%A_UserProfile% ; might leads to troubles if not reset for further run command
}

See also

Teams multiple windows


No comments:

Post a Comment