Note: Don't use absolute paths. Please always use "%~dp0" for the path; otherwise, the Install Script won't work.
start /wait MSIEXEC.EXE /i "%~dp0\TeamViewer_Host.msi" /qn CUSTOMCONFIGID=YOUR_CUSTOM_CONFIG_ID timeout /t 30 /nobreak "C:\Program Files (x86)\TeamViewer\TeamViewer.exe" assignment --id YOUR_ASSIGNMENT_ID
start /wait MSIEXEC.EXE /i "%~dp0\TeamViewer_Full.msi" /qn timeout /t 30 /nobreak "C:\Program Files\TeamViewer\TeamViewer.exe" assignment --id YOUR_ASSIGNMENT_ID
start /wait MSIEXEC.EXE /i "%~dp0\TeamViewer_Full.msi" /qn timeout /t 30 /nobreak "C:\Program Files (x86)\TeamViewer\TeamViewer.exe" assignment --id YOUR_ASSIGNMENT_ID
This parameter imports TeamViewer options. For example, a Conditional Access Router.
For more information, please read the following article:
Export settings for deployment
Don't use this parameter in combination with IMPORTREGFILE.
Please check this article for more MSI parameters.
Timeouts ensure that each step in the script has enough time to complete before the next step begins. In some cases, timeouts need to be added to the install script, and TeamViewer services need to be restarted to ensure the device is assigned correctly.
start /wait MSIEXEC.EXE /i "%~dp0\YOUR_MSI_FILE_PATH" /qn CUSTOMCONFIGID=YOUR_CUSTOM_CONFIG_ID
ping -n 30 127.0.0.1>nul
"C:\Program Files (x86)\TeamViewer\teamviewer.exe" assignment --id YOUR_ASSIGNMENT_ID
ping -n 30 127.0.0.1>nul
net stop teamviewer
ping -n 10 127.0.0.1>nul
net start teamviewer
The package will be created, and the .intunewin File will be uploaded, and depending on the setting in the assignments, the package will be pushed to the devices.