w10install/optional/users/install-teams.cmd
2023-02-17 13:16:25 +01:00

35 lines
831 B
Batchfile

@echo off
set EXE=%SystemDrive%\tools\software\teams-setup.exe
set STARTMENU_USER=%APPDATA%\"Microsoft\Windows\Start Menu\Programs"
if NOT EXIST %EXE% (
echo ERROR: %EXE% not found!
exit /b
)
echo ####### %0 #######
echo killing Teams process ...
taskkill /F /IM teams.exe 2>nul
timeout /T 3
echo cleaning cache ...
deltree "%USERPROFILE%\AppData\Roaming\Microsoft\Teams"
deltree "%USERPROFILE%\AppData\Local\Microsoft\Teams"
deltree "%USERPROFILE%\AppData\Local\Microsoft\TeamsMeetingAddin"
deltree "%USERPROFILE%\AppData\Local\Microsoft\TeamsPresenceAddin"
echo installing Microsoft Teams ...
start /wait %EXE% -s
echo copying Teams link to desktop ...
copy /Y %STARTMENU_USER%\"Microsoft Teams.lnk" "%USERPROFILE%\Desktop\Teams.lnk"
rem refresh desktop (W10 style)
ie4uinit.exe -show
echo ####### %0 #######
pause