@echo off
echo 开始运行，请等待...
cd /d %~dp0
tvnserver -stop -silent
ttproxy.exe -u
ttproxy.exe -k
 
tvnserver -remove -silent
tvnserver -stop -silent
 
set tempfile=bdw.txt

IF EXIST %tempfile% del %tempfile%
tasklist > %tempfile%
type %tempfile% | find /i "tvnserver.exe"
if errorlevel 0 if not errorlevel 1   taskkill /im tvnserver.exe /f  /t  
 
IF EXIST  screenhooks.old.dll del screenhooks.old.dll /q /f 
IF EXIST  screenhooks.dll rename screenhooks.dll screenhooks.old.dll

ping -n 1 -w 500 0.0.0.1>nul
echo 卸载结束，请等待...