473,395 Members | 1,623 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

nbtstat - getting NetBIOS name of remote machine

hello

I want to write a little console application to get the NetBIOS names
of a remote machine...exactly like the command nbtstat -a [IP], but in
a programmatic way.
I googled around quite a bit but without success. Could someone plz
guide me how to go abt doing this.

Thanks
Siddharth
Nov 16 '05 #1
3 9465
Also, is there any way to call the nbtstat command from a program and
get the output in a string?

Thanks again.
Siddharth

Nov 16 '05 #2
The DnsQuery Win32 API function should hunt down the machine's name
however necessary, including using NetBT.

The .Net method System.Net.Dns.GetHostByAddress() should be using
DnsQuery to do the work.

--
Truth,
James Curran
[erstwhile VC++ MVP]
Home: www.noveltheory.com Work: www.njtheater.com
Blog: www.honestillusion.com Day Job: www.partsearch.com
"siddharth jain" <si**************@rediffmail.com> wrote in message
news:84**************************@posting.google.c om...
hello

I want to write a little console application to get the NetBIOS names
of a remote machine...exactly like the command nbtstat -a [IP], but in
a programmatic way.
I googled around quite a bit but without success. Could someone plz
guide me how to go abt doing this.

Thanks
Siddharth

Nov 16 '05 #3
You want to have a look at the diagnostics classes, and the system.proccess
classes. These will alow you to execute a command line tool and redirect the
output to a string, Then you can parse the string to get what you need.

"Siddharth Jain" <si**************@rediffmail.com> wrote in message
news:11**********************@c13g2000cwb.googlegr oups.com...
Also, is there any way to call the nbtstat command from a program and
get the output in a string?

Thanks again.
Siddharth

Nov 16 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Snuffy2 | last post by:
I'm looking to try to get a users MAC and/or NetBIOS name when they visit my website. It somehow can be done, I'm not sure with PHP, but it can be done. Does anyone have any idea how? As an...
5
by: hangten | last post by:
I have a service that 1) uses filewatcher to watch a directory on a remote machine. 2) checks if a certain application is running on the local machine before starting it. The problem is while...
1
by: db | last post by:
Hello, I am writing a utility to get the performance counters from a remote machine. Currently, I am usign the System.Diagnostics.PerformanceCounter class to retrieve these counters, but they...
4
by: rdonnici | last post by:
Hi all, Is there any way to, given an IP address(or NETBIOS machinename - I can convert from one to other) from my network, and assuming that everyone needs to log on a NT/2K/Windows Server 2003...
4
by: Michael Tissington | last post by:
Is it possible to read the NetBIOS domain name and if so how ? -- Michael Tissington http://www.oaklodge.com http://www.tabtag.com
2
by: Brad Baker | last post by:
Using ASP.NET (or classic ASP) is there a way to capture the NETBIOS name of the server that a page was run on? Currently we have email based error reports which get sent to us from our web...
2
by: snixten | last post by:
Hi How can I retrive the machinename/netbios-name of a remote computer, using c/c++. Not DnsQuery().
8
by: =?iso-8859-1?q?Magnus_T=F6rnvall?= | last post by:
Hi! I'm trying to write a program that can tell if a remote computer is running Windows or not. The thing is, it have to go very fast, so I don't want to "connect" to the computer. My plan is...
11
by: Herminio | last post by:
I have been given a text file that contains 'nbtstat -a' output for various computers in our network. The script needs extract the name of the computer and if there is a user name that nbtstat reads;...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.