Hi Corcos,
TeamViewer is a bit of a pain to manage I must admit.
I went down a different avenue, which I thought I might share with you.
Took over managing an IT Environment that had a bunch of stuff all over the place, various installs etc.
I am using the MSI file, but also a transform file to set the Host / API etc.

My Package starts with Killing the Teamviewer Processes using the kill process steps in the deployment section.
1 Kill TeamViewer.exe
2 Kill TeamViewer_Service.exe
3 Kill tv_w32.exe
4 Kill tv_x64.exe
I then uninstall any TeamViewer versions via the following command step.
echo product where "name like 'TeamViewer%%'" call uninstall /nointeractive|wmic && shutdown /a
TeamViewer does like to leave registry settings, so I then call another two command steps.
REG DELETE HKLM\SOFTWARE\TeamViewer /f
REG DELETE HKLM\SOFTWARE\WOW6432Node\TeamViewer /f
After this I then run the following install command.
msiexec.exe /i "{PackageShare}\Teamviewer\MSI\TeamViewer_Host.v14.msi" /norestart /qn TRANSFORMS="{PackageShare}\Teamviewer\MSI\TeamViewer_Host.v14.Settings.mst"
As per the attached screenshot above, you can see the way the Transform file is configured. This was to help ensure that the correct ID's were being passed through and not needing to use that config app. I am not having to stop or start firewalls or anything like that. Hopefully it helps.
All you have to do is have the TeamViewer_Settings.reg in the same directory as the installer, if you that hat IMPORTREG option enabled in the MST (Transform File).