On Tue, 20 Oct 2020 10:13:39 -0400, "Tom Del Rosso"
Would a bit of PowerShell be considered cheating?
PowerShell has a feature where it can take script code directly on the
command line, so no external files are needed. Here's an example for
your specific problem:
@echo off
set service=Computer Browser
for /F "usebackq" %%n in (`powershell -command "Get-Service -Name
'%service%'|Format-Table -AutoSize -HideTableHeaders -Property name"`)
do set shortname=%%n
echo The short name is: %shortname%
--
RoRo