When I run Browstat.exe, from \SUPPORT\TOOLS\SUPTOOLS.MSI on the Windows CD-ROM, on my LAN, a typical output line might contain:

\\JSI007            NT   05.02 (W,S,NT,SS,PBR,BBR,DFS)     JSIINC.COMWhere:
<b>\\JSI007</b>                is the computer name.

<b>NT</b>                      is the computer's operating system.

<b>05.02</b>                   is the operating system version (Windows Server 2003).

<b>(W,S,NT,SS,PBR,BBR,DFS)</b> are the <b>BFLAGS</b>, described by the following:
                               <b>W</b>     Workstation service
                               <b>S</b>     Server service
                               <b>SQL</b>   SQLServer
                               <b>PDC</b>   PrimaryDomainController
                               <b>BDC</b>   BackupDomainController
                               <b>TS</b>    TimeSource
                               <b>AFP</b>   AFPServer
                               <b>NV</b>    Novell
                               <b>MBC</b>   MemberServer
                               <b>PQ</b>    PrintServer
                               <b>DL</b>    DialinServer
                               <b>XN</b>    Xenix
                               <b>NT</b>    Windows NT
                               <b>WFW</b>   WindowsForWorkgroups
                               <b>MFPN</b>  MS Netware
                               <b>SS</b>    StandardServer
                               <b>PBR</b>   PotentialBrowser
                               <b>BBR</b>   BackupBrowser
                               <b>MBR</b>   MasterBrowser
                               <b>OSF</b>   OSFServer
                               <b>VMS</b>   VMSServer
                               <b>W95</b>   Windows95
                               <b>DFS</b>   DistributedFileSystem
                               <b>CLUS</b>  NTCluster
                               <b>DCE</b>   IBM DSS

<b>JSIINC.COM</b>              is the <a href="/article/jsifaq/jsi-tip-2854-how-do-i-add-a-comment-when-my-windows-2000-computer-appears-in-a-browse-list-.aspx"><b>srvcomment</b></a> data value
NOTE: In a single segment LAN, you can run Browstat.exe on any computer. If your LAN has multiple segments, run it on the master browser.

I have scripted BrowInfo.bat to return the computer name, O/S, Version, BFLAGS (without the open and close parenthesis), and srvcomment.

The syntax for using BrowInfo.bat is:

for /f "Tokens=1-4*" %%a in ('BrowInfo.bat') do (
 set computer=%%a
 set OSN=%%b
 set OSV=%%c
 set BFLAGS=%%d
 set srvcmt=%%e
 call :DoSomething
)
NOTE: BrowInfo.bat converts any " marks in srvcomment to ' and encloses the entire string in " marks. The ( and ) are removed from BFLAGS.

BrowInfo.bat contains:

@echo off
setlocal ENABLEDELAYEDEXPANSION
for /f "Tokens=2" %%a in ('browstat VIEW Transport^|find "\Device\"') do (
 for /f "Tokens=1-4*" %%b in ('browstat VIEW %%a^|findstr /L /B "\\"') do (
  set CMT=%%f
  if not \{%%f\}==\{\} set CMT=!CMT:"='!
  set FLG=%%e
  set FLG=!FLG:(=!
  set FLG=!FLG:^)=!
  @echo %%b %%c %%d !FLG! "!CMT!"
 )
)
endlocal