Like this:
for /f "skip=1 delims=" %A in ( 'wmic path win32_service where "name like 'TeamViewer%'" get pathname ^| findstr /r /v "^$"') do set POSITION=%A
The findstr /r /v "^$" removes empty lines from the output.
findstr /r /v "^$"
wmic blah /value | find "=" >> wherever
output will be
field=value
no extra lines
tokenize from there, delim =