@ECHO OFF&(PUSHD "%~DP0")&(REG QUERY "HKU\S-1-5-19">NUL 2>&1)||(
powershell -Command "Start-Process '%~sdpnx0' -Verb RunAs"&&EXIT)

taskkill /f /im tv_w32.exe >NUL 2>NUL
taskkill /f /im tv_x64.exe >NUL 2>NUL
taskkill /f /im TeamViewer* >NUL 2>NUL

start /wait TeamViewer.exe api --unstaller
regsvr32 /s /u outlook\TeamViewerMeetingAddinShim.dll
regsvr32 /s /u outlook\TeamViewerMeetingAddinShim64.dll
if exist TeamViewer_Service.exe TeamViewer_Service.exe api --uninstall
if exist TeamViewer_Service.exe ren TeamViewer_Service.exe TeamViewer_Service.bak
IF NOT EXIST "%ProgramW6432%" (
start /wait "" "%~dp0tv_w32.exe" --action remove --id TEAMVIEWERVPN
) ELSE (
start /wait "" "%~dp0tv_x64.exe" --action remove --id TEAMVIEWERVPN
)
sc stop TeamViewer >NUL 2>NUL & sc delete TeamViewer >NUL 2>NUL

del rolloutfile.tv13 >NUL 2>NUL
del/f/q TeamViewer*.log >NUL 2>NUL
del/f/q TeamViewer*.txt >NUL 2>NUL
del/f/q "%WinDir%\Fonts\teamviewer15.otf" >NUL 2>NUL
rd /s/q "%TEMP%\TeamViewer" 2>NUL
rd /s/q "%AppData%\TeamViewer" 2>NUL
rd /s/q "%LOCALAPPDATA%\TeamViewer"2>NUL
del/f/q "%Public%\Desktop\TeamViewer.lnk" >NUL 2>NUL
del/f/q "%UserProfile%\Desktop\TeamViewer.lnk" >NUL 2>NUL

reg delete "HKCU\SOFTWARE\TeamViewer" /f >NUL 2>NUL
reg delete "HKLM\SOFTWARE\TeamViewer" /f >NUL 2>NUL
reg delete "HKLM\SOFTWARE\TeamViewer" /f /reg:32 >NUL 2>NUL
reg delete "HKCU\SOFTWARE\TeamViewer Manager" /f >NUL 2>NUL

reg delete "HKLM\SOFTWARE\Classes\.tpsr" /f >NUL 2>NUL
reg delete "HKLM\SOFTWARE\Classes\.tvc" /f >NUL 2>NUL
reg delete "HKLM\SOFTWARE\Classes\.tvs" /f >NUL 2>NUL
reg delete "HKLM\SOFTWARE\Classes\.tvlink" /f >NUL 2>NUL
reg delete "HKLM\SOFTWARE\Classes\blizzv1" /f >NUL 2>NUL
reg delete "HKLM\SOFTWARE\Classes\AppID\{2B433F44-5456-42FF-8CBD-54E8176ECD01}" /f >NUL 2>NUL
reg delete "HKLM\SOFTWARE\Classes\AppID\{850A928D-5456-4865-BBE5-42635F1EBCA1}" /f >NUL 2>NUL
reg delete "HKLM\SOFTWARE\Classes\AppID\TeamViewer.exe" /f >NUL 2>NUL
reg delete "HKLM\SOFTWARE\Classes\AppID\TeamViewer_Service.exe" /f >NUL 2>NUL
reg delete "HKLM\SOFTWARE\Classes\Interface\{09183D47-5456-4B6E-BA7E-F170D9F4ABEE}" /f >NUL 2>NUL
reg delete "HKLM\SOFTWARE\Classes\Interface\{14B59F6C-4FF8-4AD9-BA71-D65FDF7AEC3B}" /f >NUL 2>NUL
reg delete "HKLM\SOFTWARE\Classes\Interface\{1B1BD342-5456-4F9F-A027-1BA0254C8C0A}" /f >NUL 2>NUL
reg delete "HKLM\SOFTWARE\Classes\Interface\{2F5E4D7D-7181-44DC-8407-CAF525D85345}" /f >NUL 2>NUL
reg delete "HKLM\SOFTWARE\Classes\Interface\{457E4C9C-5456-471C-8A3C-F3BFC8DF242C}" /f >NUL 2>NUL
reg delete "HKLM\SOFTWARE\Classes\Interface\{550C2D70-5456-4990-A6B2-20E1EF1C8EBC}" /f >NUL 2>NUL
reg delete "HKLM\SOFTWARE\Classes\Interface\{6EB079FD-5456-432D-BDAB-9B38DF8DD0EE}" /f >NUL 2>NUL
reg delete "HKLM\SOFTWARE\Classes\Interface\{95C0F21E-5456-4891-B9F6-014E98858D0B}" /f >NUL 2>NUL
reg delete "HKLM\SOFTWARE\Classes\Interface\{A20E949F-5456-4A49-BE51-88077E13F793}" /f >NUL 2>NUL
reg delete "HKLM\SOFTWARE\Classes\Interface\{AD9D431B-3B37-4F4A-B676-D43D8AEAD6E2}" /f >NUL 2>NUL
reg delete "HKLM\SOFTWARE\Classes\Interface\{BDBA72AF-5456-49B0-875B-F9122A78D9FB}" /f >NUL 2>NUL
reg delete "HKLM\SOFTWARE\Classes\Interface\{BF93CDAB-5456-4611-AE2C-6F50A41564C1}" /f >NUL 2>NUL
reg delete "HKLM\SOFTWARE\Classes\Interface\{D399478A-5456-4112-B963-38E6C8AA1217}" /f >NUL 2>NUL
reg delete "HKLM\SOFTWARE\Classes\Interface\{DB86189D-5456-4B7B-B5AB-419653E156DD}" /f >NUL 2>NUL
reg delete "HKLM\SOFTWARE\Classes\Interface\{F274CC23-5456-42B2-AC7A-5C5EA0D6EFBC}" /f >NUL 2>NUL
reg delete "HKLM\SOFTWARE\Classes\Interface\{FC73DAE1-5456-440C-B6EE-0D4A235B71B5}" /f >NUL 2>NUL
reg delete "HKLM\SOFTWARE\Classes\TeamViewer.Application" /f >NUL 2>NUL
reg delete "HKLM\SOFTWARE\Classes\TeamViewer.Application.1" /f >NUL 2>NUL
reg delete "HKLM\SOFTWARE\Classes\TeamViewer.Service" /f >NUL 2>NUL
reg delete "HKLM\SOFTWARE\Classes\TeamViewer.Service.1" /f >NUL 2>NUL
reg delete "HKLM\SOFTWARE\Classes\teamviewer10" /f >NUL 2>NUL
reg delete "HKLM\SOFTWARE\Classes\teamviewer8" /f >NUL 2>NUL
reg delete "HKLM\SOFTWARE\Classes\teamviewerapi" /f >NUL 2>NUL
reg delete "HKLM\SOFTWARE\Classes\TeamViewerConfiguration" /f >NUL 2>NUL
reg delete "HKLM\SOFTWARE\Classes\TeamViewerPilotSessionReporting" /f >NUL 2>NUL
reg delete "HKLM\SOFTWARE\Classes\TeamViewerSession" /f >NUL 2>NUL
reg delete "HKLM\SOFTWARE\Classes\tvchat1" /f >NUL 2>NUL
reg delete "HKLM\SOFTWARE\Classes\tvcontrol1" /f >NUL 2>NUL
reg delete "HKLM\SOFTWARE\Classes\tvfiletransfer1" /f >NUL 2>NUL
reg delete "HKLM\SOFTWARE\Classes\tvjoinv8" /f >NUL 2>NUL
reg delete "HKLM\SOFTWARE\Classes\tvpresent1" /f >NUL 2>NUL
reg delete "HKLM\SOFTWARE\Classes\tvsendfile1" /f >NUL 2>NUL
reg delete "HKLM\SOFTWARE\Classes\tvsqcustomer1" /f >NUL 2>NUL
reg delete "HKLM\SOFTWARE\Classes\tvsqsupport1" /f >NUL 2>NUL
reg delete "HKLM\SOFTWARE\Classes\tvvideocall1" /f >NUL 2>NUL
reg delete "HKLM\SOFTWARE\Classes\tvvpn1" /f >NUL 2>NUL
reg delete "HKLM\SOFTWARE\Classes\TypeLib\{D5883D5C-5456-4BF9-844A-3F8C5E61AF9F}" /f >NUL 2>NUL
reg delete "HKLM\SOFTWARE\Classes\CLSID\{877D726A-5456-4171-9CDB-0DAB3AFFE07F}" /f >NUL 2>NUL
reg delete "HKLM\SOFTWARE\Classes\CLSID\{CFDFB010-5456-4D0B-8A07-B55C0B963627}" /f >NUL 2>NUL
reg delete "HKLM\SOFTWARE\Classes\Interface\{09183D47-5456-4B6E-BA7E-F170D9F4ABEE}" /f /reg:32 >NUL 2>NUL
reg delete "HKLM\SOFTWARE\Classes\Interface\{14B59F6C-4FF8-4AD9-BA71-D65FDF7AEC3B}" /f /reg:32 >NUL 2>NUL
reg delete "HKLM\SOFTWARE\Classes\Interface\{1B1BD342-5456-4F9F-A027-1BA0254C8C0A}" /f /reg:32 >NUL 2>NUL
reg delete "HKLM\SOFTWARE\Classes\Interface\{2F5E4D7D-7181-44DC-8407-CAF525D85345}" /f /reg:32 >NUL 2>NUL
reg delete "HKLM\SOFTWARE\Classes\Interface\{457E4C9C-5456-471C-8A3C-F3BFC8DF242C}" /f /reg:32 >NUL 2>NUL
reg delete "HKLM\SOFTWARE\Classes\Interface\{550C2D70-5456-4990-A6B2-20E1EF1C8EBC}" /f /reg:32 >NUL 2>NUL
reg delete "HKLM\SOFTWARE\Classes\Interface\{6EB079FD-5456-432D-BDAB-9B38DF8DD0EE}" /f /reg:32 >NUL 2>NUL
reg delete "HKLM\SOFTWARE\Classes\Interface\{95C0F21E-5456-4891-B9F6-014E98858D0B}" /f /reg:32 >NUL 2>NUL
reg delete "HKLM\SOFTWARE\Classes\Interface\{A20E949F-5456-4A49-BE51-88077E13F793}" /f /reg:32 >NUL 2>NUL
reg delete "HKLM\SOFTWARE\Classes\Interface\{AD9D431B-3B37-4F4A-B676-D43D8AEAD6E2}" /f /reg:32 >NUL 2>NUL
reg delete "HKLM\SOFTWARE\Classes\Interface\{BDBA72AF-5456-49B0-875B-F9122A78D9FB}" /f /reg:32 >NUL 2>NUL
reg delete "HKLM\SOFTWARE\Classes\Interface\{BF93CDAB-5456-4611-AE2C-6F50A41564C1}" /f /reg:32 >NUL 2>NUL
reg delete "HKLM\SOFTWARE\Classes\Interface\{D399478A-5456-4112-B963-38E6C8AA1217}" /f /reg:32 >NUL 2>NUL
reg delete "HKLM\SOFTWARE\Classes\Interface\{DB86189D-5456-4B7B-B5AB-419653E156DD}" /f /reg:32 >NUL 2>NUL
reg delete "HKLM\SOFTWARE\Classes\Interface\{F274CC23-5456-42B2-AC7A-5C5EA0D6EFBC}" /f /reg:32 >NUL 2>NUL
reg delete "HKLM\SOFTWARE\Classes\Interface\{FC73DAE1-5456-440C-B6EE-0D4A235B71B5}" /f /reg:32 >NUL 2>NUL
reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts" /v "TeamViewer15 (TrueType)" /f >NUL 2>NUL
reg delete "HKLM\SOFTWARE\TVInstallTemp" /f /reg:32 >NUL 2>NUL
reg delete "HKLM\SYSTEM\CurrentControlSet\Control\Class\{4d36e972-e325-11ce-bfc1-08002be10318}\0012" /f >NUL 2>NUL
reg delete "HKLM\SYSTEM\CurrentControlSet\Control\Network\{4D36E972-E325-11CE-BFC1-08002BE10318}" /f >NUL 2>NUL
reg delete "HKLM\SYSTEM\CurrentControlSet\Control\NetworkSetup2\BindPaths\{00A651B8-90DE-4C9C-C6CA-599A7CDF5EE9}" /f >NUL 2>NUL
reg delete "HKLM\SYSTEM\CurrentControlSet\Control\NetworkSetup2\Interfaces\{A765DBE2-03F5-46E9-8AD1-D01C44B37D80}" /f >NUL 2>NUL
reg delete "HKLM\SYSTEM\CurrentControlSet\Services\TeamViewer" /f >NUL 2>NUL
reg delete "HKLM\SYSTEM\CurrentControlSet\Services\teamviewervpn" /f >NUL 2>NUL
ECHO.&ECHO Íê³É &TIMEOUT /t 2 >NUL&EXIT