I am using an old version of Winbatchââ,¬â€2003J
With that version and the available extenders, it it possible to write a script that will return the name of the PC that is acting as the master browser for a subnet?
Check out the Win32 network extender function wntServerList.
AddExtender('wwwnt34i.dll')
masterbrowserflag = 262144
masterbrowser = wntServerList("","",masterbrowserflag)
AskItemlist("wntServerList - Servers running the master browser service",masterbrowser,@TAB,@SORTED,@SINGLE)
Exit
The above script should give you the master browser for the current computer but it may be theoretically possible to have more than one master browser in a subnet. It depends on whether or not the computers on the subnet are joined to the same Windows network domain or work group. If all the NetBIOS computer in the subnet are also joined to a single Windows network domain/work group then you should, hopefully, get the master browser for the subnet.
Thanks for the quick reply. The above script actually returns all of the master browsers for all of the subnets on my domainââ,¬â€Which is fine and more than I asked for!
After giving it some thought, your results do make sense on a Windows Network domain based network as apposed to a workgroup network.
Thanx for reporting your results.