@echo off

echo This script will turn off Bluetooth Tracing

setlocal enabledelayedexpansion

xcopy %~dpnx0 %systemdrive%\ /y>NUL 2>&1
if '%errorlevel%' neq '0' (
@echo Must run with admin credentials.  Please right-click and runas administrator.
goto :end
)

@REG DELETE "HKLM\System\CurrentControlSet\Control\WMI\Autologger\Rtkuart" /f
@REG DELETE "HKLM\System\CurrentControlSet\Control\WMI\Autologger\BTdevMgr" /f
@REG DELETE "HKLM\System\CurrentControlSet\Services\RtkUart\Parameters" /v BtSnoopEnabled /f


echo Done!

echo Zip your desktop\rtkuart_Traces folder and add to your bug report
echo or send to the person helping you 
echo Thanks!

:end
pause
