473,395 Members | 1,977 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.

Enumerate Domain

How do I enumerate the machines domain, then enumerate the
shares of a machine?
Jul 21 '05 #1
5 2011
I"m not sure about the shares, but you can use DirectoryServices. Here's an
article I posted a while back that will get you all of the resources in AD:

http://www.knowdotnet.com/articles/d...yservices.html
"Jeff Grundy" <je********@nospam.com> wrote in message
news:09****************************@phx.gbl...
How do I enumerate the machines domain, then enumerate the
shares of a machine?

Jul 21 '05 #2
I am trapped in an NT 4.0 domain...no active directory.

-----Original Message-----
I"m not sure about the shares, but you can use DirectoryServices. Here's anarticle I posted a while back that will get you all of the resources in AD:
http://www.knowdotnet.com/articles/d...yservices.html
"Jeff Grundy" <je********@nospam.com> wrote in message
news:09****************************@phx.gbl...
How do I enumerate the machines domain, then enumerate the shares of a machine?

.

Jul 21 '05 #3
Sorry Jeff, not sure about NT4
"jeff grundy" <je********@nospam.com> wrote in message
news:04****************************@phx.gbl...
I am trapped in an NT 4.0 domain...no active directory.

-----Original Message-----
I"m not sure about the shares, but you can use

DirectoryServices. Here's an
article I posted a while back that will get you all of

the resources in AD:

http://www.knowdotnet.com/articles/d...yservices.html
"Jeff Grundy" <je********@nospam.com> wrote in message
news:09****************************@phx.gbl...
How do I enumerate the machines domain, then enumerate the shares of a machine?

.

Jul 21 '05 #4
Hello Jeff,

Thanks for your post. You can take a look at Network Management Functions.
For example, calling NetGetJoinInformation to get a computer's domain name,
and NetShareEnum() to enumerate the shares of a machine.

Network Management Functions
http://msdn.microsoft.com/library/de...us/netmgmt/net
mgmt/network_management_functions.asp

Since they are unmanaged APIs, you may use P/Invoke to call them from
within your .NET managed application:
Consuming Unmanaged DLL Functions
http://msdn.microsoft.com/library/de...us/cpguide/htm
l/cpconconsumingunmanageddllfunctions.asp

Hope this helps.

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Jul 21 '05 #5
That is what I was looking for, thanks.
-----Original Message-----
Hello Jeff,

Thanks for your post. You can take a look at Network Management Functions.For example, calling NetGetJoinInformation to get a computer's domain name,and NetShareEnum() to enumerate the shares of a machine.

Network Management Functions
http://msdn.microsoft.com/library/default.asp? url=/library/en-us/netmgmt/netmgmt/network_management_functions.asp

Since they are unmanaged APIs, you may use P/Invoke to call them fromwithin your .NET managed application:
Consuming Unmanaged DLL Functions
http://msdn.microsoft.com/library/default.asp? url=/library/en-us/cpguide/html/cpconconsumingunmanageddllfunctions.asp

Hope this helps.

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
.

Jul 21 '05 #6

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

Similar topics

1
by: Mad Scientist Jr | last post by:
I would like to write a vb.asp.net function Private Function fn_sGetRoles(byval sDelimiter as string) As String that simply returns a delimited list of all the roles a user belongs to. I...
2
by: Mat | last post by:
How to enumerate windows domains in LAN. How to do it?
5
by: Jeff Grundy | last post by:
How do I enumerate the machines domain, then enumerate the shares of a machine?
0
by: Ben | last post by:
Hello, I would like to enumerate trusts relationship in one domain and I'm using VB.net. Does anybody know how can I do ? I have thought to use a shell command like "nltest /DOMAIN_TRUSTS" but...
0
by: Ben | last post by:
Hello, I would like to enumerate all the trust relationship for one domain, in vb.net. Does anybody kno how I can do ? Thanks. Benoit
23
by: BH Jodo Kast | last post by:
Hi, I found this handy script and I'm trying to convert it to VB.NET. It pops up a list of members in the Administrators/Builtin group. Can't seem to get DirectorySearcher or DirectoryEntry...
0
by: Morten Fagermoen | last post by:
Hi! I have a function that returns a System.Collections.Generic.List(Of String) of the users in a specified group. It seems to work fine with an exception of the Domain Users group. When I...
0
by: bcanter | last post by:
I found a file on the web that will allow you to enumerate groups but it was an .hta and the top level admins won't allow this. I need to give managers access to the groups so that when a new user is...
0
by: PRR | last post by:
Here is a code i found on "how to enumerate appdomains in a current process". The original code was posted by Thomas Scheidegger Add the following as a COM reference -...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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.