@echo off SETLOCAL ENABLEDELAYEDEXPANSION adb.exe kill-server adb.exe start-server for /F %%i IN ('adb.exe shell getprop persist.sys.language') do ( SET language=%%i ) echo !language!