@echo off
:: BatchGotAdmin ::
IF "%PROCESSOR_ARCHITECTURE%" EQU "amd64" (>nul 2>&1 "%SYSTEMROOT%\SysWOW64\cacls.exe" "%SYSTEMROOT%\SysWOW64\config\system"
) ELSE (>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system")
if '%errorlevel%' NEQ '0' (
    goto UACPrompt
) else ( goto gotAdmin )
:UACPrompt
    echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
    set params= %*
    echo UAC.ShellExecute "cmd.exe", "/c ""%~s0"" %params:"=""%", "", "runas", 1 >> "%temp%\getadmin.vbs"
    "%temp%\getadmin.vbs"
    del "%temp%\getadmin.vbs"
    exit /B
:gotAdmin
    pushd "%CD%"
    CD /D "%~dp0"
:: End BatchGotAdmin ::

set author=Admin Sunchai
TITLE Teamviewer Reset ID by %author%
color 3f
CLS
ECHO.**************************************************
ECHO.
ECHO.       Teamviewer Reset ID by %author%
ECHO.
ECHO.**************************************************
ECHO.
ECHO. Killing TeamViewer Process...
taskkill /t /f /IM tv*
taskkill /t /f /IM teamviewer*
ECHO. Copy TVTools_AlterID to Directory...
xcopy /y /r %0\..\TVTools_AlterID.exe "C:\Program Files (x86)\TeamViewer"
cd "C:\Program Files (x86)\TeamViewer"
ECHO. Reset TeamViewer ID...
start TVTools_AlterID.exe /s /f
ECHO. Starting TeamViewer...
start TeamViewer.exe
timeout /t 5 /nobreak