w10install/optional/users/install-teams.cmd

35 lines
831 B
Batchfile
Raw Normal View History

2022-11-13 22:12:39 +01:00
@echo off
2023-02-16 14:32:10 +01:00
set EXE=%SystemDrive%\tools\software\teams-setup.exe
2023-02-17 13:16:25 +01:00
set STARTMENU_USER=%APPDATA%\"Microsoft\Windows\Start Menu\Programs"
2022-11-13 22:12:39 +01:00
if NOT EXIST %EXE% (
echo ERROR: %EXE% not found!
exit /b
)
echo ####### %0 #######
2022-12-12 17:18:20 +01:00
echo killing Teams process ...
taskkill /F /IM teams.exe 2>nul
2023-02-17 13:16:25 +01:00
timeout /T 3
2022-12-12 17:18:20 +01:00
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"
2022-11-13 22:12:39 +01:00
echo installing Microsoft Teams ...
start /wait %EXE% -s
2023-02-17 13:16:25 +01:00
echo copying Teams link to desktop ...
copy /Y %STARTMENU_USER%\"Microsoft Teams.lnk" "%USERPROFILE%\Desktop\Teams.lnk"
2022-11-13 22:12:39 +01:00
rem refresh desktop (W10 style)
ie4uinit.exe -show
echo ####### %0 #######
pause