Skip to content

Instantly share code, notes, and snippets.

@DanielSmon
Last active June 19, 2024 23:48
Show Gist options
  • Save DanielSmon/cc3fa072857f0272257a5fd451768c3a to your computer and use it in GitHub Desktop.
Save DanielSmon/cc3fa072857f0272257a5fd451768c3a to your computer and use it in GitHub Desktop.
For running multiple MS Teams accounts side by side. Save this with the name of the MS Teams profile you wish to use. When launched, a folder will be created in your user profile. See https://danielsmon.com/2020/04/02/multiple-ms-teams-accounts-on-the-desktop/.
@ECHO OFF
REM Uses the file name as the profile name
SET MSTEAMS_PROFILE=%~n0
ECHO - Using profile "%MSTEAMS_PROFILE%"
SET "OLD_USERPROFILE=%USERPROFILE%"
SET "USERPROFILE=%LOCALAPPDATA%\Microsoft\Teams\CustomProfiles\%MSTEAMS_PROFILE%"
REM Ensure there is a downloads folder to avoid error described at
REM https://gist.github.com/DanielSmon/cc3fa072857f0272257a5fd451768c3a
mkdir "%LOCALAPPDATA%\Microsoft\Teams\CustomProfiles\%MSTEAMS_PROFILE%\Downloads"
REM Fixes missing "Desktop" folder
mkdir "%LOCALAPPDATA%\Microsoft\Teams\CustomProfiles\%MSTEAMS_PROFILE%\Desktop"
ECHO - Launching MS Teams with profile %MSTEAMS_PROFILE%
cd "%OLD_USERPROFILE%\AppData\Local\Microsoft\Teams"
"%OLD_USERPROFILE%\AppData\Local\Microsoft\Teams\Update.exe" --processStart "Teams.exe"
@0siribix
Copy link

I played around with this again. Script still works for Teams Classic. The "New Teams" is a UWP app and I didn't find a way to open a second window.

As an alternative you can create multiple profiles in Firefox or Chrome and open a Teams instance in each browser instance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment