Announcements

Here you will find the download links for all modules
in version 9: TeamViewer 9

Posted by wthreats
Photon

Upgrading from 13 to 14 Scripting

Hey I just wanted to share my issue here.

I have set up in my org TeamViewer 13 last year. I set it up via Active Directory Group Policy by creating a GPO and under Conputer Configuration > Windows Settings > Scripts. I was able to successfully do it no problem! (After learning of course). However, when it came to upgrading to TeamView 14 it was more difficult than expected. The reason is because when installed TV13, It also installed a (MSI Wrapper) (not sure if everyone got this with the install but I did.) Anyway It would not let me do a direct upgrade without uninstalling 13 for some reason. 

So to test I made a batch file to auto uninstall 13 "remotely". Still wouldn't let me install 14. That's when I notice that TeamViewer 13 (MSI Wrapper) was still stuck in programs and features. Everytime I went to uninstall it would state that it was missing a .dll file. Meaning that it did uninstall but my windows environment didn't let it go for some reason. To make it worse, it would not let me reinstall 13!!!! 

So what I decided to do was to do was make sure to check in Program Files (x86) to make sure it was uninstalled. The TeamViewer folder was there and some log files but nothing else. So I went regedit and searched for "TeamViewer 13 (MSI Wrapper) and found that windows was holding onto the fact that it thinks the program was still installed. I deleted the registry folder altogether and refresh my Programs and Features. It was no longer showing! I was able to install 14 just fine afterwards (Thankfully 14 does not come with a wrapper). So I would like to share my batch file with everyone to at least get them started. There may be a better way to do this but I stuck with what works.

 

%WINDIR%\System32\wbem\wmic.exe product where name="TeamViewer 14" call uninstall /NOINTERACTIVE
%WINDIR%\System32\wbem\wmic.exe product where name="TeamViewer 13 Host (MSI Wrapper)" call uninstall /NOINTERACTIVE
%WINDIR%\System32\wbem\wmic.exe product where name="TeamViewer 13 Host" call uninstall /NOINTERACTIVE
%WINDIR%\System32\wbem\wmic.exe product where name="TeamViewer 13 (MSI Wrapper)" call uninstall /NOINTERACTIVE
%WINDIR%\System32\wbem\wmic.exe product where name="TeamViewer 13" call uninstall /NOINTERACTIVE
reg delete HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Installer\Products\D53C3C8049A233B408C0378B4832BED8 /f
reg delete HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Installer\Products\9D3E2F610E5B**Please do not post TeamViewer IDs**58C28D9D32 /f
reg delete HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Installer\Products\DC**Please do not post TeamViewer IDs**C61E41B658A85FAE33B9C /f
del "%ProgramFiles(x86)%\TeamViewer\*.*" /q
IF NOT EXIST "%ProgramFiles(x86)%\TeamViewer\TeamViewer.exe" msiexec /i "\\path\TeamViewerMSI\TeamViewer_Host-idc1234567(Configuration ID).msi" /qn IMPORTREGFILE=1 CUSTOMCONFIGID=hcgsyb3 APITOKEN=whateveryourtokenis ASSIGNMENTOPTIONS="--alias %COMPUTERNAME% --grant-easy-access --reassign"
exit

And it works! It goes through a bit for the wmic stuff to make sure it is uninstalled and the regedits removes the wrappers. After that the "del" .exe makes sure that Teamviewer.exe is not in that programs folder for me to create an IF statement.

 

Hope this helps!!