I'm using ODT to download and install office onto computers on startup. To do this I'm running a local script that checks the registry for the version of Word. If it exists the script doesn't run on bootup. This has worked to push Office to all my computers in the domain. Here is my script:
@echo off
FOR /F "tokens=3 delims=." %%O IN ('reg query HKEY_CLASSES_ROOT\Word.Application\CurVer') DO SET _officeVer=%%O
IF %ERRORLEVEL% EQU 1 GOTO INSTALL
:INSTALL
echo "INSTALLING OFFICE 365..."
%1\setup.exe /configure %1\O365ProPlusX64.xml
However, I had it setup to prevent teams from being installed with GPO. I now want to install Teams, but because office is already installed I need to change my script so that it reruns to install teams on next bootup.
What is a good way to check if Teams has been installed to have the script run on boot if the computer doesnt have it? I see some people check the appData folder for a settings.json, but that wouldn't exist for a new user? Is teams installed globally or per user? My script runs on boot and not on login.
This goes into a broader question of how to manage installing Office in general with GPO and ODT. Should I really be checking for Word, Excel, Power Point ect and if it doesn't exist run the setup? Should I have a seperate XML for each app and run that setup if its not installed so that I can manage apps on a per computer basis? Or is this pointless - do I need to even bother checking or is it common practice to just run configure on every boot? If Office is already installed to the specs defined in the XML, the setup.exe should just skip reinstalling, right? I'm only using a script to check because I saw an example like this. I'd imagine the setup.exe already has these kind of checks built in?